Repository navigation
JIT: ignore finally-entry backedges when fixing continuation weights - #135837
Merged
Merged
Conversation
A finally handler can have ordinary backedge predecessors, not just callfinallies. Filter them before accessing the paired continuation, matching EH-edge construction and avoiding a null dereference. Fixes dotnet#135819 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ec7c151-8b7f-4bf9-8b1a-8c601a2965ec
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Execution of the regression under profile-weighted compilation remains unverified and needs human confirmation.
0 open findings
What changed in this PR
Fixes the JIT crash described in #135819 by excluding ordinary finally-handler backedges from continuation-weight updates.
Changes:
- Restricts continuation processing to
BBJ_CALLFINALLYpredecessors. - Adds a regression test with an infinite loop inside a finally handler.
| File | Description |
|---|---|
| src/tests/JIT/Regression_ro_2/Runtime_135819.cs | Adds the reported crash scenario as a regression test. |
| src/coreclr/jit/importer.cpp | Skips non-callfinally predecessors before accessing continuations. |
🧠 Review effort: Balanced
This was referenced Oct 15, 2026
Closed
Member
Author
|
PTAL @dotnet/jit-contrib, trivial change, no diffs |
adamperlin
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A finally handler can have ordinary backedge predecessors, not just callfinallies. Filter them before accessing the paired continuation, matching EH-edge construction and avoiding a null dereference.
Fixes #135819
No diffs