[WIP] ref!: sentry_value-based attachments - #1974
Open
jpnurmi wants to merge 7 commits into
Open
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- sentry_value-based attachments ([#1974](https://github.com/getsentry/sentry-native/pull/1974))If none of the above apply, you can opt out of this check by adding |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## jpnurmi/fix/unwinder-arm32-ip #1974 +/- ##
=================================================================
+ Coverage 74.25% 74.27% +0.01%
=================================================================
Files 104 104
Lines 25365 25616 +251
Branches 4535 4566 +31
=================================================================
+ Hits 18835 19026 +191
- Misses 5232 5302 +70
+ Partials 1298 1288 -10 🚀 New features to boost your workflow:
|
jpnurmi
force-pushed
the
jpnurmi/ref/attachments
branch
from
August 11, 2026 20:01
4ecd0c8 to
7cfebae
Compare
On ARM32, unw_step first asks libunwind whether the current frame is a signal frame. The vendored implementation answers that by reading an instruction directly from the cursor's initial IP. Its local address-space validation is enabled only after this probe, so an unmapped IP faults inside the crash handler instead of returning an unwind error. This surfaced when unrelated stack-layout changes made the handler fallback produce 0x10c as its initial IP. No attachment code ran on that path; the changed layout only exposed the unwinder's unchecked read. The resulting SIGSEGV recursively entered the crash handler and prevented the original abort from being captured. Check /proc/self/maps before calling unw_step. Keep the initial frame, as the existing invalid-stack-pointer path does, but stop the walk before libunwind can dereference an unmapped address. Cover the failure with an ARM32 context whose initial IP is intentionally unmapped.
jpnurmi
force-pushed
the
jpnurmi/ref/attachments
branch
from
August 12, 2026 06:33
7cfebae to
ed216c7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2adc394. Configure here.
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.

Warning
WIP 🚧🔨⏳⛔
Caution
BREAKING CHANGE
Attachment setters now accept
sentry_value_t. Attach helpers returnsentry_uuid_tinstead ofsentry_attachment_t *, and removal takes an attachment UUID.Scope data is moving to fine-grained read/write locking to allow concurrent readers. A read-locked getter cannot safely return a borrowed
sentry_attachment_tpointer because a writer may remove and free the attachment as soon as the read lock is released.Represent attachments and attachment collections as refcounted
sentry_value_tobjects. A getter can retain the value under the read lock and return an owned reference that remains valid after unlocking.Configure attachments before insertion and freeze them once added. Use UUIDs for removal, and retain byte values while envelopes borrow their payload to avoid copying attachment data.
Resolves: #1945