-
Notifications
You must be signed in to change notification settings - Fork 5.3k
JIT: fix x86 EH issue when removing an empty try #115731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tinuation Morph may have already cleared out the continuation block, so we won't find a GT_END_LFIN there. Fixes dotnet#115700
|
@dotnet/jit-contrib PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses an x86 EH issue in the JIT by tolerating the case where the try/finally block has an unreachable continuation (e.g., when the finally throws and the continuation is cleared). The key changes include adding a new test to trigger the scenario and modifying the continuation cleanup logic in the JIT to account for empty throw blocks.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/tests/JIT/Regression/JitBlue/Runtime_115700/Runtime_115700.csproj | New project file for the regression test |
| src/tests/JIT/Regression/JitBlue/Runtime_115700/Runtime_115700.cs | Test case to reproduce the condition where the finally throws |
| src/coreclr/jit/fgehopt.cpp | Update to fgCleanupContinuation to tolerate an empty BBJ_THROW continuation |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
amanasifkhalid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Looks like jit-format is broken again?
|
Formatting error is in codegenxarch, unrelated. I can fix it here I guess. |
|
Lots of time outs.. .this change should be very safe an unblocks formatting, so going to merge. |
|
/ba-g lots of timeouts |
If the try/finally has an unreachable continuation (eg the finally throws), morph may have already cleared out the continuation block, so we won't find a GT_END_LFIN there. Tolerate.
Fixes #115700