From: Ivan Maidanski Date: Fri, 6 Apr 2018 06:13:03 +0000 (+0300) Subject: Fix missing SIGBUS handler setup for kFreeBSD X-Git-Tag: v7.6.6~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83dd5411e81c0b9bf9eed2b7c6bb5044936071d2;p=gc Fix missing SIGBUS handler setup for kFreeBSD Issue #184 (bdwgc). * os_dep.c [MPROTECT_VDB && !DARWIN && !MSWIN32 && !MSWINCE && FREEBSD && __GLIBC__] (GC_mprotect_dirty_init): Call sigaction(SIGBUS). --- diff --git a/os_dep.c b/os_dep.c index 5930ea35..abfa2335 100644 --- a/os_dep.c +++ b/os_dep.c @@ -3412,7 +3412,7 @@ GC_INNER void GC_remove_protection(struct hblk *h, word nblocks, GC_VERBOSE_LOG_PRINTF("Replaced other SIGSEGV handler\n"); } # if defined(HPUX) || defined(LINUX) || defined(HURD) \ - || (defined(FREEBSD) && defined(SUNOS5SIGS)) + || (defined(FREEBSD) && (defined(__GLIBC__) || defined(SUNOS5SIGS))) sigaction(SIGBUS, &act, &oldact); if ((oldact.sa_flags & SA_SIGINFO) != 0) { GC_old_bus_handler = oldact.sa_sigaction;