Skip to content

Failfast from async inst+unbox thunks - #121812

Merged
MichalStrehovsky merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:instthunk
Nov 19, 2025
Merged

MichalStrehovsky merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:instthunk

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

and block tests on ActiveIssue.

FailFast is better than memory corruptions.

Cc @dotnet/ilc-contrib

and block tests on ActiveIssue.

FailFast is better than memory corruptions.
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
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 adds failfast behavior for async instantiating and unboxing thunks in NativeAOT to prevent memory corruption, along with comprehensive test coverage for the affected scenarios.

  • Adds failfast calls in three thunk generation paths when async methods are detected, preventing memory corruption until proper async support is implemented
  • Marks existing and new tests with ActiveIssue attributes to skip them on NativeAOT until issue #121781 is resolved
  • Expands test coverage to include default interface methods with async implementations

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs Adds failfast for async calls in instantiating stubs to prevent memory corruption
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.BoxedTypes.cs Adds failfast for async calls in two unboxing stub paths to prevent memory corruption
src/tests/async/inst-unbox-thunks/inst-unbox-thunks.cs Adds ActiveIssue attributes to existing tests and new test cases for async default interface methods
src/tests/async/inst-unbox-thunks/inst-unbox-thunks.csproj Adds TestLibrary project reference needed for IsNativeAot check in ActiveIssue attributes

@MichalStrehovsky
MichalStrehovsky merged commit 0bba685 into dotnet:main Nov 19, 2025
@MichalStrehovsky
MichalStrehovsky deleted the instthunk branch November 19, 2025 21:54
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 20, 2025
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