Skip to content

Conversation

@davidwrighton
Copy link
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
Contributor

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

Copy link
Contributor

Copilot AI left a comment

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

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants