Repository navigation
Conversation
Setting `SENTRY_NATIVE_BACKEND=native` as a Gradle property or an environment variable replaces the inproc `sentry-native-ndk` with `sentry-android-ndk-outproc`. Its crash service sends native crashes at crash time instead of on the next launch. CI builds an extra production sample APK with the switch and runs a Maestro flow that crashes in native code without relaunching the app, so only the crash service can send the `SIGSEGV` event. The mocked Sentry server now gunzips only gzip-encoded requests, because the crash daemon sends envelopes uncompressed.
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
PR risk: mediumFor commit Main concerns: dependencies customers inherit, public contract, data sent to Sentry. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
Contributor
|
This was referenced Dec 1, 2026
jpnurmi
added a commit
to getsentry/sentry-native
that referenced
this pull request
Dec 1, 2026
On arm64 with pointer authentication, frame records hold signed return addresses. The handler's capture recorded them as junk, and the daemon's own walk would too, because `SENTRY__STRIP_PAC` only stripped on macOS. Replace it with a shared `sentry__strip_pac()`, which keeps the macOS mask and uses `xpaclri` on Linux and Android, a NOP on CPUs without PAC. A fixed mask does not fit there because the PAC bits start at the virtual address size, such as bit 39 on Android. Like `strip_pac()` in libunwindstack-ndk from getsentry/libunwindstack-ndk#12 and `StripPACBits()` in crashpad from getsentry/crashpad#118, it binds the address to x30 with a register variable for `xpaclri`. Ref: getsentry/sentry-react-native#7152
jpnurmi
added a commit
to getsentry/sentry-native
that referenced
this pull request
Dec 1, 2026
On arm64 with pointer authentication, frame records hold signed return addresses. The handler's capture recorded them as junk, and the daemon's own walk would too, because `SENTRY__STRIP_PAC` only stripped on macOS. Replace it with a shared `sentry__strip_pac()`, which keeps the macOS mask and uses `xpaclri` on Linux and Android, a NOP on CPUs without PAC. A fixed mask does not fit there because the PAC bits start at the virtual address size, such as bit 39 on Android. Like `strip_pac()` in libunwindstack-ndk from getsentry/libunwindstack-ndk#12 and `StripPACBits()` in crashpad from getsentry/crashpad#118, it binds the address to x30 with a register variable for `xpaclri`. Ref: getsentry/sentry-react-native#7152
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.
📢 Type of change
📜 Description
Adds an opt-in for sentry-native 1.0's out-of-process crash backend on Android. See https://blog.sentry.io/sentry-native-sdk-1-0/.
Setting
SENTRY_NATIVE_BACKEND=nativeas a Gradle property or an environment variable replaces the inprocsentry-native-ndkwithsentry-android-ndk-outproc, whose crash service sends native crashes at crash time instead of on the next launch.CI builds an extra production sample APK with the switch and runs a Maestro flow that crashes in native code without relaunching the app. The mocked Sentry server now gunzips only gzip-encoded requests, because the crash service sends envelopes uncompressed.
💡 Motivation and Context
With the inproc backend, a native crash reaches Sentry only if the app is launched again.
💚 How did you test it?
yarn test-android-nativeand manual native crashes in the sample on a Pixel 8 Pro: https://sentry-sdks.sentry.io/issues/7874367971/?project=5428561📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps