Repository navigation
Report CORINFO_ASYNC_SAVE_CONTEXTS when needed - #121613
Merged
Merged
Conversation
This was added in dotnet#121448 on the VM side, managed side needs a matching change (I actually found this because we had a newly failing test, yay).
Contributor
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds the CORINFO_ASYNC_SAVE_CONTEXTS flag to the managed JIT interface to match a corresponding VM-side change from #121448. This flag indicates that a runtime async method requires save and restore of async contexts, which is needed for user-implemented async methods but not for transparent thunks.
Key Changes
- Added the
CORINFO_ASYNC_SAVE_CONTEXTSenum flag with value0x00000200 - Implemented logic to set this flag for async variant implementations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs | Added CORINFO_ASYNC_SAVE_CONTEXTS enum value to CorInfoOptions |
| src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs | Added logic to set the flag when compiling async variant implementation methods |
jakobbotsch
approved these changes
Nov 14, 2025
jakobbotsch
left a comment
Member
There was a problem hiding this comment.
Sorry, I will start making these changes on the managed side too 🙂
This was referenced Nov 14, 2025
Open
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This was added in #121448 on the VM side, managed side needs a matching change (I actually found this because we had a newly failing test, yay).
Cc @dotnet/ilc-contrib @jakobbotsch