Skip to content

Use secret arg to determine if reverse pinvoke is ILStub or not #117035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented Jun 26, 2025

Modified JIT_ReversePInvokeEnterTrackTransitions to use the given secret arg to identify if a method desc needs unwrapping and is a stub. This fixes cases where we step through the reverse Pinvoke boundary

Co-authored-by: Jan Kotas jkotas@microsoft.com

Modified JIT_ReversePInvokeEnterTrackTransitions to use the given secret arg
to identify if a method desc needs unwrapping and is a stub.

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@hoyosjs hoyosjs requested review from Copilot and jkotas and removed request for Copilot June 26, 2025 02:03
@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 Jun 26, 2025
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 updates JIT_ReversePInvokeEnterTrackTransitions to use the provided secret argument to determine if a MethodDesc requires unwrapping when it represents an ILStub.

  • Adds an assertion to ensure that secretArg is non-null for ILStub cases.
  • Refactors the branch logic to consistently use the UMEntryThunk pointer derived from secretArg.

@hoyosjs hoyosjs enabled auto-merge (squash) June 26, 2025 03:09
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkotas
Copy link
Member

jkotas commented Jun 26, 2025

/ba-g known wasm build failure

@hoyosjs hoyosjs merged commit 1c2cef4 into dotnet:main Jun 26, 2025
96 of 100 checks passed
@hoyosjs hoyosjs deleted the juhoyosa/step-revpinvoke branch June 26, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants