Skip to content

[WTF] The signal handler runs on the alternate signal stack, and a thread that runs it there can be suspended - #741

Open
robobun wants to merge 3 commits into
mainfrom
robobun/75562ee0/signal-handler-onstack
Open

robobun wants to merge 3 commits into
mainfrom
robobun/75562ee0/signal-handler-onstack

[WTF] A thread that runs the signal handler on the alternate stack ca…

5586daa
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Sep 29, 2026 in 24m 52s

Code review found 1 new issue (1 earlier finding still open)

Found 2 candidates, confirmed 2: 1 posted in this review, 1 from earlier reviews still open. See review comments for details.

Details

Severity Count
🔴 Important 2
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important Source/WTF/wtf/threads/Signals.cpp:529 On Linux the fix in this push works or not per how the thread registered its sigaltstack, not per where the fault happen

Annotations

Check failure on line 529 in Source/WTF/wtf/threads/Signals.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

On Linux the fix in this push works or not per how the thread registered its sigaltstack, not per where the fault happened. Since kernel 4.7 uc_stack.ss_flags holds the flags passed to sigaltstack, so the test at Signals.cpp:529 is a per-thread constant.

On Linux the fix in this push works or not per how the thread registered its sigaltstack, not per where the fault happened. Since kernel 4.7 uc_stack.ss_flags holds the flags passed to sigaltstack, so the test at Signals.cpp:529 is a per-thread constant. Registered with SS_ONSTACK: registers are never published and the profiler hang remains. Registered with 0 or SS_AUTODISARM: a handler nested in another alternate-stack handler publishes registers whose sp is on that stack, which the base backed