Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Various async fixes - #122948

#122948
Merged
davidwrighton merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
davidwrighton:various_async_fixesdavidwrighton/runtime:various_async_fixesCopy head branch name to clipboard
Jan 7, 2026
Merged

Various async fixes#122948
davidwrighton merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
davidwrighton:various_async_fixesdavidwrighton/runtime:various_async_fixesCopy head branch name to clipboard

Conversation

@davidwrighton

Copy link
Copy Markdown
Member

Fix issues around suppressed flow
Disable tests
Add support for DOTNET_JitOptimizeAwait to match jit behavior

…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
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 DefaultFlowSuppressed sentinel value instead of NULL
  • Renamed restoreContextsMethod to restoreContextsOnSuspensionMethod for consistency with the JIT implementation
  • Added DOTNET_JitOptimizeAwait configuration 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

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Comment thread src/coreclr/interpreter/interpconfigvalues.h
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.