fix: prevent redundant native exceptions on Android/CoreCLR#5127
Merged
jamescrosswell merged 5 commits intomainfrom Apr 16, 2026
Merged
fix: prevent redundant native exceptions on Android/CoreCLR#5127jamescrosswell merged 5 commits intomainfrom
jamescrosswell merged 5 commits intomainfrom
Conversation
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Features ✨
Fixes 🐛
Dependencies ⬆️Deps
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5127 +/- ##
==========================================
+ Coverage 74.04% 74.05% +0.01%
==========================================
Files 501 501
Lines 18107 18107
Branches 3523 3523
==========================================
+ Hits 13408 13410 +2
+ Misses 3838 3837 -1
+ Partials 861 860 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
57fd7bb to
7b2244a
Compare
e5df035 to
2a35e7a
Compare
2a35e7a to
1fcad67
Compare
Enable the io.sentry.ndk.preload metadata so that SentryNdkPreloadProvider installs sentry-native's signal handlers before .NET/CoreCLR. This ensures the correct handler chain order (.NET -> sentry-native -> debuggerd) where .NET handles managed exceptions first, and native crashes chain to sentry-native. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1fcad67 to
12cb11f
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keeps the source-tree Sentry.targets import out of the shared integration-test/Directory.Build.targets so non-Android integration tests (AOT, runtime, console) aren't affected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Android CoreCLR support starts with .NET 10; running the coreclr cases on net9.0 would fail at build time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jamescrosswell
approved these changes
Apr 16, 2026
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
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.
Note
Depends on
Fixes duplicate native exceptions (#3954) on Android by reordering signal handlers to let .NET/CoreCLR handle managed exceptions first, and then chain real native exceptions to Sentry.
Before:
After:
Reordering the signal handlers only works with CoreCLR (
UseMonoRuntime=false, experimental in Android .NET 10.0+) for the time being.With Mono, one will have to opt in for the "chain at start" signal handler strategy until the following fix has been released: