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] [mini] Don't add unbox tramopline on generic DIM calls #58585

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 2, 2021

Backport of #58521 to release/6.0

/cc @lambdageek

Customer Impact

Code using generic default interface methods instantiated to valuetypes will crash. The cause is an incorrect unboxing of the this argument of the managed method. The callee would work correctly but when someone used this, there would be incorrect data or a crash.

Fixes #58394

Testing

CI. Added a new regression test.

Risk

Moderate. I added some additional assertions in the trampoline for calls like this on branches that I thought couldn't happen. It's possible there's some managed code that could hit those assertions. (On the other hand if I preemptively fixed the "couldn't happen" cases incorrectly, or if they're incorrect to begin with, those crashes would be difficult to diagnose since they would be in later unrelated managed methods).

Don't unbox a valuetype `this` if the generic method is a DIM

Fixes #58394
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Sep 2, 2021

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

Issue Details

Backport of #58521 to release/6.0

/cc @lambdageek

Customer Impact

Testing

Risk

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

area-VM-meta-mono

Milestone: -

@Anipik Anipik merged commit 89f7f7c into release/6.0 Sep 7, 2021
@akoeplinger akoeplinger deleted the backport/pr-58521-to-release/6.0 branch September 9, 2021 11:25
@ghost ghost locked as resolved and limited conversation to collaborators Oct 9, 2021
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.

4 participants