-
-
Notifications
You must be signed in to change notification settings - Fork 366
[WIP] fix: interop with managed Mono/CoreCLR 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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6193 +/- ##
=============================================
- Coverage 86.697% 86.606% -0.092%
=============================================
Files 436 436
Lines 37076 37151 +75
Branches 17390 17420 +30
=============================================
+ Hits 32144 32175 +31
- Misses 4890 4931 +41
- Partials 42 45 +3
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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
e4be364
to
2f90356
Compare
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 |
📜 Description
WIP: Prevent the Cocoa SDK from capturing managed .NET exceptions.
First, if a managed Mono/CoreCLR runtime is detected based on previously installed Mach exception ports, we avoid overriding the port to let the managed runtime keep its null exception port for
EXC_BAD_ACCESS
andEXC_ARITHMETIC
.Secondly, when running within a managed runtime, Cocoa SDK's signal handler invokes the previously installed signal handlers to give the managed runtime first 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.
💡 Motivation and Context
Fixes a long-standing issue with redundant crash events with Sentry.NET on iOS:
💚 How did you test it?
Sentry.Samples.Maui
in Sentry.NET:📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.