Skip to content

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Dec 19, 2022

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.
@BrzVlad BrzVlad added Servicing-consider Issue for next servicing release review area-Codegen-Interpreter-mono labels Dec 19, 2022
@BrzVlad BrzVlad requested a review from vargaz as a code owner December 19, 2022 14:47
@ghost
Copy link

ghost commented Dec 19, 2022

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:

Servicing-consider, area-Codegen-Interpreter-mono

Milestone: -

@ghost ghost assigned BrzVlad Dec 19, 2022
@SamMonoRT SamMonoRT added this to the 6.0.x milestone Dec 19, 2022
@SamMonoRT SamMonoRT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Dec 19, 2022
@SamMonoRT
Copy link
Member

/cc @carlossanlop - approved via Tactics email. @BrzVlad - please confirm CI failures are not related. Thanks.

@BrzVlad
Copy link
Member Author

BrzVlad commented Dec 21, 2022

The failures don't look related and I see them also on other PRs so this is good

@carlossanlop carlossanlop modified the milestones: 6.0.x, 6.0.14 Jan 5, 2023
@carlossanlop
Copy link
Contributor

Approved by Tactics (6.0.14).
Signed off by area owners.
No OOB changes needed.
CI failures investigated as unrelated.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 81cb2af into dotnet:release/6.0 Jan 5, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 5, 2023
Sign up for free to 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