Skip to content

Conversation

davidwrighton
Copy link
Member

The managed helper includes the GC poll within it, since JIT_GCPoll is itself managed, when we are in a pure interpreted environment, we will go into infinite recursion triggering the INTOP_SAFEPOINT code

@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 18:31
Copy link
Contributor

@Copilot 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 an infinite recursion issue in the CoreCLR interpreter's safepoint implementation. The problem occurs when using a pure interpreted environment where calling the managed JIT_GCPoll helper from INTOP_SAFEPOINT creates recursion since JIT_GCPoll itself is managed code.

Key changes:

  • Replaces the managed JIT_GCPoll() call with a direct GC transition using GCX_PREEMP()
  • Adds explanatory comment about the purpose of the GC transition

@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 Oct 1, 2025
@jkotas jkotas added area-CodeGen-Interpreter-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 1, 2025
Copy link
Contributor

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

@davidwrighton davidwrighton merged commit 42bbba9 into dotnet:main Oct 1, 2025
101 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.

3 participants