Skip to content

R2r skip return dropping thunks#127186

Draft
jtschuster wants to merge 2 commits intodotnet:mainfrom
jtschuster:r2r-skip-return-dropping-thunks
Draft

R2r skip return dropping thunks#127186
jtschuster wants to merge 2 commits intodotnet:mainfrom
jtschuster:r2r-skip-return-dropping-thunks

Conversation

@jtschuster
Copy link
Copy Markdown
Member

This should force the runtime to compile a new thunk and get the covariant tests passing in CI.

jtschuster and others added 2 commits April 20, 2026 14:55
The R2R entrypoint lookup fix in readytoruninfo.cpp resolves
dotnet#126755, so the
CrossGenTest=false workaround added in dotnet#126775 can be removed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jtschuster
Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr crossgen2

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
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 addresses a CI failure in the covariant async return tests under ReadyToRun (R2R) by ensuring VM-synthesized “return-dropping” async thunks do not incorrectly bind to an unrelated R2R entry point, forcing the runtime to generate/compile the correct thunk at runtime.

Changes:

  • Re-enable CrossGen/R2R testing for the covariant-return async test project by removing the CrossGenTest=false override.
  • Update ReadyToRunInfo::GetEntryPoint to bypass R2R entrypoint lookup for MethodDesc instances representing return-dropping async thunks, falling back to prestub/thunk generation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/tests/async/covariant-return/covariant-returns.csproj Removes the CrossGenTest opt-out so the scenario is exercised again in CI.
src/coreclr/vm/readytoruninfo.cpp Skips R2R entrypoint resolution for return-dropping thunks to avoid incorrect binding and ensure correct thunk codegen/dispatch.

Copy link
Copy Markdown
Member

@VSadov VSadov left a comment

Choose a reason for hiding this comment

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

LGTM. Scenarios that involve these thunks are very rare. It is ok to not r2r them.

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants