-
-
Notifications
You must be signed in to change notification settings - Fork 371
[WIP] fix: AOT interop with managed .NET runtimes #6193
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
Draft
jpnurmi
wants to merge
7
commits into
main
Choose a base branch
from
jpnurmi/mono-interop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
jpnurmi
added a commit
to getsentry/sentry-dotnet
that referenced
this pull request
Sep 18, 2025
This reverts "Use pre-built version of sentry-cocoa SDK (#3727)" commit d179ec9 and restores the modules/sentry-cocoa Git module checked out at: getsentry/sentry-cocoa#6193
2f90356 to
ed98b04
Compare
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7c7ac56 | 1225.90 ms | 1250.22 ms | 24.33 ms |
| 8ea5293 | 1242.70 ms | 1262.25 ms | 19.55 ms |
| 35c962f | 1207.61 ms | 1235.90 ms | 28.29 ms |
| aa98fe8 | 1227.69 ms | 1253.18 ms | 25.50 ms |
| 339539a | 1219.58 ms | 1254.63 ms | 35.05 ms |
| 0ac4c65 | 1236.85 ms | 1267.84 ms | 30.98 ms |
| 6ee4973 | 1228.42 ms | 1252.26 ms | 23.84 ms |
| b13e93a | 1236.24 ms | 1247.33 ms | 11.08 ms |
| 2e79f5f | 1220.53 ms | 1249.35 ms | 28.82 ms |
| 5ae9ff1 | 1222.31 ms | 1250.96 ms | 28.65 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7c7ac56 | 23.75 KiB | 902.49 KiB | 878.74 KiB |
| 8ea5293 | 23.75 KiB | 852.24 KiB | 828.49 KiB |
| 35c962f | 23.75 KiB | 854.77 KiB | 831.02 KiB |
| aa98fe8 | 23.75 KiB | 891.01 KiB | 867.26 KiB |
| 339539a | 23.75 KiB | 968.24 KiB | 944.50 KiB |
| 0ac4c65 | 23.75 KiB | 968.24 KiB | 944.50 KiB |
| 6ee4973 | 23.75 KiB | 896.53 KiB | 872.79 KiB |
| b13e93a | 23.75 KiB | 855.37 KiB | 831.62 KiB |
| 2e79f5f | 23.75 KiB | 928.87 KiB | 905.12 KiB |
| 5ae9ff1 | 23.74 KiB | 971.82 KiB | 948.08 KiB |
Screen.Recording.2025-09-18.at.11.54.52.mov |
This was referenced Sep 22, 2025
ed98b04 to
8559ea9
Compare
db30de0 to
dd33f14
Compare
dd33f14 to
e51c82e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
WIP: Prevent the Cocoa SDK from capturing managed .NET exceptions.
First of all, we need to avoid overriding Mono's Mach exception port for
EXC_BAD_ACCESSandEXC_ARITHMETIC. Secondly, the Sentry's signal handler first invokes Mono's signal handler to give it a chance to convert it into a managed exception and redirect execution into the managed runtime’s exception handling machinery, so that managed code can catch and process the exception as if it were a normal .NET exception. Finally, Sentry's crash capturing kicks in only and only if we do not detect IP/SP modifications in the context.💡 Motivation and Context
Fixes a long-standing issue with redundant crash events with Sentry.NET on iOS:
See also similar Sentry Native changes for Android:
💚 How did you test it?
Sentry.Samples.Mauiin Sentry.NET:📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.