From dc7ed820ab4de19275f6b2bb30f4bdd3f14f3331 Mon Sep 17 00:00:00 2001 From: Peter Meerwald Date: Wed, 13 Aug 2014 01:19:37 +0200 Subject: [PATCH] memtrap: Debian/kFreeBSD seems to signal SIGSEGV, not SIGBUS handle both signals on Debian/kFreeBSD, otherwise sigbus-test fails: Running suite(s): Sig Bus Let's see if this worked: This is a test that should work fine. And memtrap says it is good: yes tests/sigbus-test.c:59:E:sigbus:sigbus_test:0: (after this point) Received signal 11 (Segmentation fault) Signed-off-by: Peter Meerwald --- src/pulsecore/memtrap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c index 87ea4fe6c..d04f27801 100644 --- a/src/pulsecore/memtrap.c +++ b/src/pulsecore/memtrap.c @@ -237,5 +237,8 @@ void pa_memtrap_install(void) { sa.sa_flags = SA_RESTART|SA_SIGINFO; pa_assert_se(sigaction(SIGBUS, &sa, NULL) == 0); +#ifdef __FreeBSD_kernel__ + pa_assert_se(sigaction(SIGSEGV, &sa, NULL) == 0); +#endif #endif }