Skip to content

[release/7.0] [mono][interp] Add unbox when calling valuetype method through delegate - #79614

Merged
carlossanlop merged 3 commits into
dotnet:release/7.0from
BrzVlad:backport-interp-virt-delegate-vt
Jan 4, 2023
Merged

[release/7.0] [mono][interp] Add unbox when calling valuetype method through delegate#79614
carlossanlop merged 3 commits into
dotnet:release/7.0from
BrzVlad:backport-interp-virt-delegate-vt

Conversation

@BrzVlad

Copy link
Copy Markdown
Member

If we are calling an open instance delegate, where the target method is on a valuetype, we will need to unbox this pointer.

Backport of #79445

Fixes#79354

Customer Impact

MAUI iOS applications making use of the popular AutoMapper NuGet library can crash in debug builds. Workaround is to disable mono interpreter and implicitly hot reload. Other platforms using interpreter, like blazor wasm, can potentially hit this issue even in Release.

Testing

Verified fix on sample app provided in the bug report and created a simple test case that is included in our suite.

Risk

Low. The fix only touches the code path for a very specific type of delegate invocation pattern which was previously handled incorrectly before.

If we are calling an open instance delegate, where the target method is on a valuetype, we will need to unbox this pointer.
@ghost

Copy link
Copy Markdown

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

Issue Details

If we are calling an open instance delegate, where the target method is on a valuetype, we will need to unbox this pointer.

Backport of #79445

Fixes #79354

Customer Impact

MAUI iOS applications making use of the popular AutoMapper NuGet library can crash in debug builds. Workaround is to disable mono interpreter and implicitly hot reload. Other platforms using interpreter, like blazor wasm, can potentially hit this issue even in Release.

Testing

Verified fix on sample app provided in the bug report and created a simple test case that is included in our suite.

Risk

Low. The fix only touches the code path for a very specific type of delegate invocation pattern which was previously handled incorrectly before.

Author:BrzVlad
Assignees:-
Labels:

area-Codegen-Interpreter-mono

Milestone:-

@SamMonoRTSamMonoRT added the Servicing-consider Issue for next servicing release review label Dec 13, 2022
@SamMonoRTSamMonoRT added this to the 7.0.x milestone Dec 13, 2022
@BrzVlad

Copy link
Copy Markdown
MemberAuthor

From the original PR, this doesn't contain the 846f4ea commit, since it is unnecessary risk for backport PR

@SamMonoRT

Copy link
Copy Markdown
Member

@carlossanlop - this is approved via Tactics email, but we should wait till @BrzVlad confirms the CI failures are not relevant.

@SamMonoRTSamMonoRT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Dec 13, 2022
@BrzVlad
BrzVladforce-pushed the backport-interp-virt-delegate-vt branch from 7ced39b to dc8a8aaCompareDecember 14, 2022 07:50
@BrzVlad
BrzVladforce-pushed the backport-interp-virt-delegate-vt branch from dc8a8aa to 61d4333CompareDecember 14, 2022 11:08
@BrzVlad

Copy link
Copy Markdown
MemberAuthor

I'm not seeing any failures with this

@carlossanlopcarlossanlop modified the milestones: 7.0.x, 7.0.3Jan 4, 2023
@carlossanlop

Copy link
Copy Markdown
Contributor

Approved by Tactics (7.0.3).
Signed off by area owner.
CI failure is known/unrelated/already fixed #78778 .
No OOB changes needed.
Ready to merge. :shipit:

@carlossanlop
carlossanlop merged commit 77237c6 into dotnet:release/7.0Jan 4, 2023
@ghostghost locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@BrzVlad@SamMonoRT@carlossanlop@vargaz