Skip to content
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

[release/6.0] Fix unmatched transition callback in JIT_ReversePInvokeExitTrackTransitions #59939

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 4, 2021

Backport of #59919 to release/6.0

/cc @AaronRobinsonMSFT @k15tfu @jkoritzinsky

This was regressed in #46238 (which was merged, GitHub's display is buggy), and was missed due to the fact that we have limited/no profiler tests in the dotnet/runtime repo. Additionally, this transition notification API is only used by some profilers, so it's possible that the profilers we test with didn't notice the bug.

Customer Impact

Users of ICorProfilerCallback::ManagedToUnmanagedTransition will be triggered incorrectly when being notified of the transition from managed to unmanaged when leaving a reverse P/Invoke.

Since this is in the ICorProfilerCallback interface and that is used in many scenarios that are considered business priority by Microsoft this would appear to be a priority fix.

Testing

Fix was provided by and validated by an external user. Upon code inspection by Interop team the fix was obviously correct and represented a copy/paste error.

Risk

Minimal. The correct callback is now being called instead of the incorrect one. This only impacts scenarios using ICorProfilerCallback::ManagedToUnmanagedTransition.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 4, 2021
@ghost
Copy link

ghost commented Oct 4, 2021

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

Issue Details

Backport of #59919 to release/6.0

/cc @AaronRobinsonMSFT @k15tfu

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jkotas jkotas added area-Interop-coreclr and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Oct 4, 2021
@AaronRobinsonMSFT
Copy link
Member

/cc @tommcdon @davmason for impact to Diagnostic scenarios.

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

Approved. Please get a code review and we should take for consideration for .NET 6

@jeffschwMSFT jeffschwMSFT added this to the 6.0.0 milestone Oct 4, 2021
@jeffschwMSFT jeffschwMSFT added the Servicing-approved Approved for servicing release label Oct 4, 2021
@jeffschwMSFT jeffschwMSFT merged commit 5d5a119 into release/6.0 Oct 4, 2021
@jkoritzinsky jkoritzinsky deleted the backport/pr-59919-to-release/6.0 branch October 4, 2021 18:45
vitek-karas added a commit to vitek-karas/runtime that referenced this pull request Oct 4, 2021
Copy link
Member

@davmason davmason left a comment

Choose a reason for hiding this comment

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

LGTM!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Interop-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants