Repository navigation
[FEAT] Native crash handler (experimental, opt-in) - #1
Merged
Merged
Conversation
added 2 commits
July 20, 2026 12:49
…tal, opt-in) options.enable_native_crash_handler (default off): installs handlers for SIGSEGV/ABRT/BUS/ILL/FPE/TRAP with SA_SIGINFO|SA_ONSTACK on a pre-allocated sigaltstack. The handler is write()-only over a pre-opened fd against a pre-captured module table (dl_iterate_phdr + NT_GNU_BUILD_ID) — no malloc, no locks — capturing PC (+LR on ARM) as (module, build-id, offset) frames, then chaining to any pre-existing handler (Unity/UGS) and re-raising the default so the process dies with the true signal. Dump is picked up at the NEXT launch and reported through the existing pipeline with crashType + osSignal; a native dump supersedes the generic unclean-shutdown, a restored managed crash still wins. Linux/Android only (fail-soft no-op elsewhere). Tests: pure parser (truncation-tolerant), take-once semantics, payload wire fields, and a Linux fork/SIGSEGV integration test asserting dump-written + chained-handler-ran + died-with-signal. v0.9.0.
…ts actually run The suite compiled but was absent from the add_test foreach list, so CTest never executed it (incl. the Linux fork/SIGSEGV chaining integration test).
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.
In-process async-signal-safe native crash handler (Linux/Android), default-off via
options.enable_native_crash_handler. Dump-at-crash -> report-at-next-launch with (module,build-id,offset) frames, handler chaining, crashType/osSignal. See CHANGELOG 0.9.0. CI is the build gate (no local C++ toolchain); the Linux job runs a real fork/SIGSEGV chaining integration test.