Repository navigation
fix(native): Preserve existing alternate signal stacks - #2219
Merged
Merged
Conversation
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 cd3feb6. Configure here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v1 #2219 +/- ##
==========================================
+ Coverage 75.52% 75.97% +0.45%
==========================================
Files 105 105
Lines 29642 29633 -9
Branches 5479 5478 -1
==========================================
+ Hits 22387 22515 +128
+ Misses 5829 5745 -84
+ Partials 1426 1373 -53 🚀 New features to boost your workflow:
|
Share the inproc signal-stack helpers through `sentry_os` and use them for native backend setup and cleanup. Reuse stacks installed by the runtime instead of replacing them with heap allocations that ASan tries to unmap when a thread exits.
The unit suite was only ever built with `SENTRY_BACKEND=none`, so every test guarded by `SENTRY_BACKEND_NATIVE` in `test_native_backend.c` compiled to `SKIP_TEST()` in CI. Add a `test_unit_native` variant that builds `sentry_test_unit` together with `sentry-crash`, which `sentry_init` spawns for the native backend.
Move `log_path` to static storage to reduce the handler's stack usage by 4 KiB and avoid overflowing existing 16 KiB signal stacks. The `handling_crash` guard prevents concurrent use of the buffer.
jpnurmi
force-pushed
the
jpnurmi/fix/native-sigaltstack
branch
from
October 19, 2026 19:13
02a160f to
9fdd567
Compare
mujacica
approved these changes
Oct 20, 2026
JoshuaMoelans
approved these changes
Oct 20, 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.

A follow-up to #2216 that attempted to run unit tests with
SENTRY_BACKEND=nativein the CI but had to take a step back because of unrelated ASan failures intests/test_unit.py::test_unit_native[concurrent_init]: https://github.com/getsentry/sentry-native/actions/runs/39236786444/job/118007754912Share
inprocalternate signal-stack helpers throughsentry_osand use them fornativesetup and cleanup. Reuse stacks installed by the runtime instead of replacing them with heap allocations that ASan tries to unmap when a thread exits.