X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fbsd-os.c;h=54a1c008b537357fc92069b063d100ca96727f4c;hb=422b88abf96f4842a3d0999cd3b80d96f5a153d6;hp=eaf6e10c7f06cff1c506e4a7e9c2c309c5c08b3f;hpb=68b13d8fac5207d339de227871818203f4cab0ab;p=sbcl.git diff --git a/src/runtime/bsd-os.c b/src/runtime/bsd-os.c index eaf6e10..54a1c00 100644 --- a/src/runtime/bsd-os.c +++ b/src/runtime/bsd-os.c @@ -230,23 +230,19 @@ memory_fault_handler(int signal, siginfo_t *siginfo, void *void_context) #else #error unsupported BSD variant #endif - if (!gencgc_handle_wp_violation(fault_addr)) { - interrupt_handle_now(signal, siginfo, void_context); - } + os_context_t *context = arch_os_get_context(&void_context); + if (!gencgc_handle_wp_violation(fault_addr)) + if(!handle_control_stack_guard_triggered(context,fault_addr)) + /* FIXME is this context or void_context? not that it */ + /* makes a difference currently except on linux/sparc */ + interrupt_handle_now(signal, siginfo, void_context); } void os_install_interrupt_handlers(void) { SHOW("os_install_interrupt_handlers()/bsd-os/defined(GENCGC)"); -#if defined __FreeBSD__ - undoably_install_low_level_interrupt_handler(SIGBUS, - memory_fault_handler); -#elif defined __OpenBSD__ - undoably_install_low_level_interrupt_handler(SIGSEGV, + undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT, memory_fault_handler); -#else -#error unsupported BSD variant -#endif SHOW("leaving os_install_interrupt_handlers()"); }