Fix interpreter async suspend DiagnosticIP calculation#125282
Merged
davidwrighton merged 6 commits intodotnet:mainfrom Mar 7, 2026
Merged
Fix interpreter async suspend DiagnosticIP calculation#125282davidwrighton merged 6 commits intodotnet:mainfrom
davidwrighton merged 6 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes interpreter async suspension diagnostics by changing how CORINFO_AsyncResumeInfo.DiagnosticIP is recorded/relocated, and re-enables/adds tests that cover async throw-after-yield scenarios.
Changes:
- Interpreter compiler: store
DiagnosticIPas an offset during emission and relocate it during method finalization. - Async simple EH tests: re-enable two tests previously disabled for the interpreter.
- Interpreter test suite: add coverage for throw-after-yield async exception handling.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/coreclr/interpreter/compiler.cpp | Adjusts how async suspend DiagnosticIP is captured and relocated during finalization. |
| src/tests/async/simple-eh/simple-eh.cs | Removes ActiveIssue gating so two async EH tests run again under interpreter. |
| src/tests/JIT/interpreter/Interpreter.cs | Adds an async throw-after-yield scenario to the interpreter test driver. |
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.
Fix #124044
The interpreter was storing an absolute address for
DiagnosticIPinINTOP_HANDLE_CONTINUATION_SUSPEND, but this field needs to be stored as an offset and then relocated duringFinalizeMethodData(similar to other fields likemethodStartIP).This caused a crash in
ToString_Asyncand other async exception handling tests on Apple mobile with CoreCLR R2R and interpreter fallback, because the diagnostic IP pointed to invalid memory.Changes:
compiler.cpp: StoreDiagnosticIPas an offset from method code start during emit, then add the final bytecode base address during finalization.simple-eh.cs: RemoveActiveIssueattributes for the three tests that were disabled due to this bug.