/* * The GC needs to be hooked into whatever signal is raised for * page fault on this OS. */ static void sigsegv_handler(int signal, siginfo_t *info, os_context_t *context) { os_vm_address_t addr = arch_get_bad_addr(signal, info, context); #ifdef LISP_FEATURE_ALPHA /* Alpha stuff: This is the end of a pseudo-atomic section during which a signal was received. We must deal with the pending interrupt (see also interrupt.c, ../code/interrupt.lisp) (how we got here: when interrupting, we set bit 63 in reg_ALLOC. At the end of the atomic section we tried to write to reg_ALLOC, got a SIGSEGV (there's nothing mapped there) so ended up here. */ if (addr != NULL && *os_context_register_addr(context, reg_ALLOC) & (1L<<63)) { *os_context_register_addr(context, reg_ALLOC) -= (1L<<63); interrupt_handle_pending(context); return; } #endif #ifdef LISP_FEATURE_GENCGC if (!gencgc_handle_wp_violation(addr)) #else if (!cheneygc_handle_wp_violation(context, addr)) #endif if (!handle_guard_page_triggered(context, addr)) lisp_memory_fault_error(context, addr); }
static void sigsegv_handler(int signal, siginfo_t *info, os_context_t *context) { os_vm_address_t addr = arch_get_bad_addr(signal, info, context); if (!cheneygc_handle_wp_violation(context, addr)) { if (!handle_guard_page_triggered(context,addr)) lisp_memory_fault_error(context, fault_addr); } }
static void sigsegv_handler(int signal, siginfo_t *info, os_context_t *context) { os_vm_address_t addr = arch_get_bad_addr(signal, info, context); if (!cheneygc_handle_wp_violation(context, addr)) if (!handle_guard_page_triggered(context, addr)) lisp_memory_fault_error(context, addr); *((os_context_register_t *) &((ucontext_t *) context)->uc_mcontext.ss_flags) |= SS_MODIFIEDWIDE; }