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] [mono] Preserve FirstChanceExceptionEventArgs ctor #68265

Merged
merged 2 commits into from
May 5, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 20, 2022

Backport of #68235 to release/6.0

/cc @akoeplinger

Customer Impact

A customer reported in dotnet/android#6626 that a Xamarin Android app crashed when subscribing to the AppDomain.CurrentDomain.FirstChanceException event when IL trimming is enabled.

The reason was that the IL linker removed the FirstChanceExceptionEventArgs constructor since there's no reference to it in the app code. However the mono runtime tries to create it from native code. To fix this we added code to preserve the constructor.

There are workarounds so this isn't critical for MAUI release.

Testing

Manual testing, made sure the FirstChanceExceptionEventArgs constructor is preserved when the app subscribes to the AppDomain.CurrentDomain.FirstChanceException event and trimmed when it doesn't.

Risk

Low.

IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

@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.

@teo-tsirpanis teo-tsirpanis added this to the 6.0.x milestone Apr 20, 2022
@marek-safar marek-safar added the Servicing-consider Issue for next servicing release review label Apr 20, 2022
@akoeplinger
Copy link
Member

akoeplinger commented Apr 21, 2022

Test failures are unrelated: #65279, backport of the test fix is done in #68332

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 5, 2022
@rbhanda rbhanda modified the milestones: 6.0.x, 6.0.6 May 5, 2022
@carlossanlop
Copy link
Member

@marek-safar @lambdageek can I get your sign-off on this PR so we can get it merged?

@steveisok steveisok self-requested a review May 5, 2022 21:40
@carlossanlop carlossanlop merged commit ed41478 into release/6.0 May 5, 2022
@carlossanlop carlossanlop deleted the backport/pr-68235-to-release/6.0 branch May 5, 2022 21:57
@ghost ghost locked as resolved and limited conversation to collaborators Jun 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-meta-mono Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants