Skip to content

Conversation

@davidwrighton
Copy link
Member

The NextCallReturnAddress intrinsic is only actually used in a case inside of the tail-call helper function, and in some of our interp modes we occasionally try to interpreter this tail-call helper. Instead of allowing that to happen, just skip the compilation.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 22, 2026
@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.

@davidwrighton
Copy link
Member Author

/azp run runtime-interpreter

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@davidwrighton davidwrighton marked this pull request as ready for review January 26, 2026 21:01
Copilot AI review requested due to automatic review settings January 26, 2026 21:01
@davidwrighton davidwrighton removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 26, 2026
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 pull request adds support for skipping interpreter compilation when encountering the NextCallReturnAddress intrinsic that is not followed by a POP instruction. This intrinsic is used in tail-call helper functions which are currently only supported by the JIT, not the interpreter.

Changes:

  • Introduces a new SKIPCODE error handling function that throws CORJIT_SKIPPED exception to skip compilation
  • Adds handling for NI_System_StubHelpers_NextCallReturnAddress in EmitNamedIntrinsicCall to skip compilation when the intrinsic is not followed by POP

Reviewed changes

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

File Description
src/coreclr/interpreter/failures.h Added declaration for new SKIPCODE function
src/coreclr/interpreter/eeinterp.cpp Implemented SKIPCODE function that throws CORJIT_SKIPPED exception
src/coreclr/interpreter/compiler.cpp Added case handler for NextCallReturnAddress intrinsic to skip compilation when not followed by POP

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!

Copilot AI review requested due to automatic review settings January 30, 2026 00:20
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

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

@davidwrighton
Copy link
Member Author

/ba-g known infra issues

@davidwrighton davidwrighton merged commit 684e5d1 into dotnet:main Jan 30, 2026
97 of 107 checks passed
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.

2 participants