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

Calculate if we're in an instance method in one place to support reverse IL stubs. #33199

Merged
1 commit merged into from
Mar 5, 2020

Conversation

jkoritzinsky
Copy link
Member

For reverse stubs, we don't set the calling convention of the stub to the actual calling convention since the JIT doesn't support reading that correctly. As a result, the emit for return values in reverse P/Invokes wasn't correctly detecting that it was a thiscall stub. This PR changes the "are we an instance method" check to live in one place (where we have the knowledge of which calling convention the stub is for).

Contributes to #33129 (fixes the crash, but there's still incorrect behavior from the JIT)

@ghost
Copy link

ghost commented Mar 5, 2020

Hello @jkoritzinsky!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 2d0ebf1 into dotnet:master Mar 5, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
@jkoritzinsky jkoritzinsky deleted the reverse-thiscall-fix branch January 21, 2021 19:29
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants