... so that the corruption mechanism can kick in.
#!-linux
(define-signal-handler sigemt-handler "SIGEMT")
(define-signal-handler sigbus-handler "bus error")
-(define-signal-handler sigsegv-handler "segmentation violation")
#!-linux
(define-signal-handler sigsys-handler "bad argument to a system call")
(enable-interrupt sigemt #'sigemt-handler)
(enable-interrupt sigfpe #'sb!vm:sigfpe-handler)
(enable-interrupt sigbus #'sigbus-handler)
- (enable-interrupt sigsegv #'sigsegv-handler)
#!-linux
(enable-interrupt sigsys #'sigsys-handler)
(enable-interrupt sigalrm #'sigalrm-handler)
FSHOW((stderr, "Memory fault at: %p, PC: %p\n", fault_addr, *os_context_pc_addr(context)));
if (!gencgc_handle_wp_violation(fault_addr))
- if(!handle_guard_page_triggered(context,fault_addr)) {
-#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
+ if(!handle_guard_page_triggered(context,fault_addr))
lisp_memory_fault_error(context, fault_addr);
-#else
-
- /* this disabled section is what used to be here: */
-#if 0
- /* FIXME: never returns 0 */
- if (!maybe_gc(context)) {
- interrupt_handle_now(signal, siginfo, context);
- }
-#endif
- /* FIXME: Nowadays, maybe_gc does return 1 to indicate
- * that GC did happen, but I'm keeping the code as it
- * was. */
- maybe_gc(context);
- interrupt_handle_now(signal, siginfo, context);
-#endif
- }
}
#if defined(LISP_FEATURE_MACH_EXCEPTION_HANDLER)
#ifdef LISP_FEATURE_PPC
/* PPC calls alloc() from a trap, look up the most
* recent one and frob that. */
- {
- int context_index =
- fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,
- thread));
- os_context_t *context =
- thread->interrupt_contexts[context_index - 1];
- maybe_save_gc_mask_and_block_deferrables(context);
- }
+ maybe_save_gc_mask_and_block_deferrables
+ (get_interrupt_context_for_thread(thread));
#else
maybe_save_gc_mask_and_block_deferrables(NULL);
#endif
if (!cheneygc_handle_wp_violation(context, addr))
if (!handle_guard_page_triggered(context, addr))
- interrupt_handle_now(signal, info, context);
+ lisp_memory_fault_error(context, addr);
*((os_context_register_t *) &((ucontext_t *) context)->uc_mcontext.ss_flags)
|= SS_MODIFIEDWIDE;
}
*/
current_memory_fault_address = addr;
/* To allow debugging memory faults in signal handlers and such. */
- corruption_warning_and_maybe_lose("Memory fault");
+ corruption_warning_and_maybe_lose("Memory fault at %x", addr);
unblock_signals_in_context_and_maybe_warn(context);
+#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
arrange_return_to_lisp_function(context,
StaticSymbolFunction(MEMORY_FAULT_ERROR));
+#else
+ funcall0(StaticSymbolFunction(MEMORY_FAULT_ERROR));
+#endif
}
#endif
if (!cheneygc_handle_wp_violation(context, addr))
#endif
if (!handle_guard_page_triggered(context, addr))
-#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
lisp_memory_fault_error(context, addr);
-#else
- interrupt_handle_now(signal, info, context);
-#endif
}
void
interrupt_handle_pending(context);
} else if (!cheneygc_handle_wp_violation(context, addr)) {
if(!handle_guard_page_triggered(context,addr))
- interrupt_handle_now(signal, info, context);
+ lisp_memory_fault_error(context, addr);
}
}
void* fault_addr = (void*)info->si_addr;
if (!gencgc_handle_wp_violation(fault_addr))
- if(!handle_guard_page_triggered(context, fault_addr))
-#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
- lisp_memory_fault_error(context, fault_addr);
-#else
- interrupt_handle_now(signal, info, context);
-#endif
+ if(!handle_guard_page_triggered(context, fault_addr))
+ lisp_memory_fault_error(context, fault_addr);
}
#else
if (!cheneygc_handle_wp_violation(context, addr)) {
if (!handle_guard_page_triggered(context,addr))
- interrupt_handle_now(signal, info, context);
+ lisp_memory_fault_error(context, fault_addr);
}
}
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.25.51"
+"1.0.25.52"