From 9a02b87dc137ee146bca5a0545201b4f27591405 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 22 Dec 2024 14:18:32 -0500 Subject: sighook: Always re-raise faults on macOS macOS always fills in si_code for SIG{BUS,ILL,SEGV} as if it were a real hardware fault, so returning from the handler is not guaranteed to re- trigger the signal. Fixes: aecdabb ("sighook: Return instead of re-raising for faults") Link: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2386463/4/util/posix/signals_test.cc Link: https://github.com/chromium/crashpad/commit/e0d8a0aa01ac176804077f1f128ccc894c098f79 --- tests/sighook.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/sighook.c') diff --git a/tests/sighook.c b/tests/sighook.c index 3a715e6..ba1c424 100644 --- a/tests/sighook.c +++ b/tests/sighook.c @@ -216,5 +216,9 @@ void check_sighook(void) { check_sigexit(SIGINT); check_sigexit(SIGQUIT); check_sigexit(SIGPIPE); + + // macOS cannot distinguish between sync and async SIG{BUS,ILL,SEGV} +#if !__APPLE__ check_sigexit(SIGSEGV); +#endif } -- cgit v1.2.3