Loading
Commits on Source 10
-
cznic authored
Since 0ae842f8 (v1.76.0) ___libc_sigaction is a Go function that records dispositions for delivery through os/signal and never touches the kernel; Xabort's ___libc_sigaction(SIGABRT, SIG_DFL) therefore leaves the Go runtime's SIGABRT handler installed, and the kill(getpid(), SIGABRT) that follows prints "SIGABRT: abort" and a goroutine dump to stderr before the runtime re-raises the signal and dies. In v1.75.7 the transpiled musl __libc_sigaction issued the rt_sigaction syscall, so the process died silently, as a C abort() does. The difference is observable: Tcl's exec reports a child that dies by a signal as "child killed: SIGABRT" only when its stderr stayed empty, and sqlite's writecrash.test (test_devsym.c calls abort() on the n-th write) matches on that, so every linux target of modernc.org/libsqlite3 fails writecrash-1.1.1 with v1.76.0 and passes with v1.75.7 - verified A/B on linux/amd64 with everything else equal. resetSigDfl (abort_linux.go, the musl linux ports) installs SIG_DFL with rt_sigaction and unblocks the signal with rt_sigprocmask, replacing the runtime's handler for that one signal; Xabort calls it after the bookkeeping call to ___libc_sigaction and then raises SIGABRT thread-directed with tgkill, as the Go runtime's raise() and the netbsd Xabort do, because a process-directed kill(2) is asynchronous and the calling thread can run on before the signal lands. The kill and the panic that follow are unreachable fallbacks. With this writecrash.test passes again (0 errors out of 997 tests), and libsqlite3's full Tcl permutation on linux/amd64 is back to its waived failures only. Builds on all eight linux ports. Co-Authored-By:
Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dq5kdSFJ1eyaaH2cjpMAKk
-
cznic authored
-
cznic authored
-
cznic authored
-
cznic authored
-
cznic authored
-
cznic authored
-
cznic authored
-
cznic authored
-
cznic authored