Skip to content

Tests: report the fault address and thread in the crash backtrace - #1823

Merged
Mysticial merged 4 commits into
mainfrom
tests-crash-fault-address
Nov 2, 2026
Merged

Mysticial merged 4 commits into
mainfrom
tests-crash-fault-address

Conversation

@pa-devbot

@pa-devbot pa-devbot commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Small follow-up to #1819, for the Mac Intel crash investigation.

Part 1 — fault address + thread id. When the runner dies on SIGSEGV/SIGBUS, the signal's faulting address (si_addr) tells us which memory region the bad pointer landed in — stack, heap, or a library — which narrows the corruption source far more than the backtrace alone. The handler is now installed with sigaction()/SA_SIGINFO and the [PA-CRASH] line becomes:

[PA-CRASH] Fatal signal 11, fault address 0x0, thread 0x7f..; backtrace:

Part 2 — refactor into ErrorReports/. All the Apple/Linux backtrace/signal-handler code moved out of CommandLineTests.cpp into CommonFramework/ErrorReports/CrashBacktrace.h/.cpp, next to the existing Windows crash handling (ProgramDumper), following its structure: platform split in the .cpp, no-op on the other side. CommandLineTests.cpp just includes the header and calls install_crash_backtrace_handlers().

Verified locally with a forced SIGSEGV: the line, the backtrace, and the 139 exit code all still come through.

When the runner dies on SIGSEGV/SIGBUS, the signal's faulting address
(si_addr) tells us which memory region the bad pointer landed in
(stack, heap, a library), which narrows the corruption source far
more than the backtrace alone. The handler is now installed with
sigaction()/SA_SIGINFO and prints the signal number, the faulting
address (for SIGSEGV/SIGBUS), and the crashing thread's id on the
[PA-CRASH] line.
Refactor of the fault-address addition: all the Apple/Linux backtrace
and signal-handler code now lives in
CommonFramework/ErrorReports/CrashBacktrace.h/.cpp, next to the
existing Windows crash handling (ProgramDumper), following its
structure (platform split in the .cpp, no-op on the other side).
CommandLineTests.cpp just includes the header and calls
install_crash_backtrace_handlers().
@pa-devbot
pa-devbot force-pushed the tests-crash-fault-address branch from f7e0e64 to e44318c Compare November 1, 2026 20:33
@Mysticial
Mysticial merged commit 46df70c into main Nov 2, 2026
6 of 7 checks passed
@Mysticial
Mysticial deleted the tests-crash-fault-address branch November 2, 2026 01:10
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.

2 participants