Merged
Conversation
…ion context into the async context Fix issue where interpreter thunks were visible in Environment.StackTrace Fix issue where the FromStack and FromStackDMI tests were showing various thunks generated as part of async codegen. We can't hide them, so the test is disabled
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes several issues related to async/await execution context handling in the CoreCLR interpreter and adds configuration parity with the JIT compiler.
- Fixed execution context flow suppression to properly use the
DefaultFlowSuppressedsentinel value instead ofNULL - Renamed
restoreContextsMethodtorestoreContextsOnSuspensionMethodfor consistency with the JIT implementation - Added
DOTNET_JitOptimizeAwaitconfiguration support to the interpreter to match JIT behavior and allow disabling async optimizations for debugging
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/async/reflection/reflection.cs | Added ActiveIssue attributes to disable two reflection tests for CoreCLR interpreter due to known issue #122547 |
| src/coreclr/vm/interpexec.cpp | Fixed flow-suppressed execution context handling to use DefaultFlowSuppressed sentinel; renamed restoreContextsMethod field; added scoping block for threadBase GCPROTECT |
| src/coreclr/vm/corelib.h | Added DEFINE_CLASS and DEFINE_FIELD macros to expose ExecutionContext.DefaultFlowSuppressed field to native code |
| src/coreclr/interpreter/interpconfigvalues.h | Added JitOptimizeAwait configuration option (DEBUG-only) to control async/await optimizations |
| src/coreclr/interpreter/inc/interpretershared.h | Renamed restoreContextsMethod to restoreContextsOnSuspensionMethod to match updated naming convention |
| src/coreclr/interpreter/compiler.cpp | Added check for JitOptimizeAwait config to conditionally disable async peephole optimizations; updated field reference to restoreContextsOnSuspensionMethod |
| src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs | Added StackTraceHidden attributes to AsyncHelpers_ResumeInterpreterContinuation and ResumeInterpreterContinuation methods |
BrzVlad
reviewed
Jan 7, 2026
This was referenced Jan 7, 2026
Open
This was referenced Jan 9, 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 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.
Fix issues around suppressed flow
Disable tests
Add support for DOTNET_JitOptimizeAwait to match jit behavior