Skip to content

[FEAT] Native crash handler (experimental, opt-in) - #1

Merged
francoios merged 2 commits into
mainfrom
feat/native-crash-handler
Jul 20, 2026
Merged

francoios merged 2 commits into
mainfrom
feat/native-crash-handler

Conversation

@francoios

Copy link
Copy Markdown
Contributor

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.

AnkleBreaker Cowork 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).
@francoios
francoios merged commit f899e61 into main Jul 20, 2026
3 checks passed
@francoios
francoios deleted the feat/native-crash-handler branch July 20, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant