JIT: Initialize Wasm resume IP to a rethrowing value - #133649
Open
AndyAyersMS wants to merge 2 commits into
Open
JIT: Initialize Wasm resume IP to a rethrowing value#133649AndyAyersMS wants to merge 2 commits into
AndyAyersMS wants to merge 2 commits into
Conversation
Fixes dotnet#133613. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 6 pipeline(s). 10 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 |
Member
Author
|
@jakobbotsch PTAL |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Add coverage for first-use resume dispatch before any resume IP has been stored.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Initializes and resets the Wasm exception-resumption IP to prevent stale dispatch state.
Changes:
- Initializes the resume IP to zero.
- Clears resume state after successful resumption.
- Adds repeated-catch regression coverage.
File summaries
| File | Changes |
|---|---|
src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ExceptionTests.cs |
Adds regression coverage for repeated catches. |
src/coreclr/jit/fgwasm.cpp |
Resets resume state after accepted resumption. |
src/coreclr/jit/codegenwasm.cpp |
Initializes resume state in the Wasm prolog. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
davidwrighton
approved these changes
Sep 11, 2026
davidwrighton
left a comment
Member
There was a problem hiding this comment.
Looks good to me, but I wonder if we should flow the resumeip through the wasm exception to avoid needing to set/reset the value.
This was referenced Sep 11, 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.
Initialize resume IP on entry to zero (a non-resuming value for all trys), and reset it to this value if a try resumes post-catch.
This prevents a try from seeing a stale resume IP if its catch never reaches the catchret.
Fixes #133613.
Note
This pull request description was generated by GitHub Copilot.