Repository navigation
Conversation
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
force-pushed
the
jpnurmi/fix/native-strip-pac
branch
from
December 1, 2026 12:24
4c75783 to
2e21886
Compare
This branch has not been deployed
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.
Required for:
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_PAConly stripped on macOS.Replace it with a shared
sentry__strip_pac(), which keeps the macOS mask and usesxpaclrion 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 andStripPACBits()in crashpad from getsentry/crashpad#118, it binds the address to x30 with a register variable forxpaclri.