(__siginfohandler_t *)
#endif
memory_fault_handler);
-#ifdef SIG_MEMORY_FAULT2
- undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT2,
-#ifdef LISP_FEATURE_FREEBSD
- (__siginfohandler_t *)
-#endif
- memory_fault_handler);
-#endif
#endif
#ifdef LISP_FEATURE_SB_THREAD
SHOW("os_install_interrupt_handlers()/bsd-os/!defined(GENCGC)");
undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT,
sigsegv_handler);
-#ifdef SIG_MEMORY_FAULT2
- undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT2,
- sigsegv_handler);
-#endif
}
#endif /* defined GENCGC */
#endif /* __NetBSD__ */
#ifdef __FreeBSD__
+extern int getosreldate(void);
+
+int sig_memory_fault;
+
static void freebsd_init()
{
+ /* Memory fault signal on FreeBSD was changed from SIGBUS to
+ * SIGSEGV. */
+ if (getosreldate() < 700004)
+ sig_memory_fault = SIGBUS;
+ else
+ sig_memory_fault = SIGSEGV;
+
/* Quote from sbcl-devel (NIIMI Satoshi): "Some OSes, like FreeBSD
* 4.x with GENERIC kernel, does not enable SSE support even on
* SSE capable CPUs". Detect this situation and skip the
#define KERN_PROC_PATHNAME 12
#endif
-extern int getosreldate(void);
-
char *
os_get_runtime_executable_path()
{
* step flag bit by messing with the flags stored in a signal context,
* so we need to implement single stepping in a more roundabout way. */
#define CANNOT_GET_TO_SINGLE_STEP_FLAG
-#define SIG_MEMORY_FAULT SIGSEGV
/* Sometime in late 2005 FreeBSD was changed to signal SIGSEGV instead
* of SIGBUS for memory faults, as required by POSIX. In order to
* support both new and old FreeBSD at the same time, both signals are
* quaint memories, feel free to delete this hack (and any code that's
* #ifdef SIG_MEMORY_FAULT2'ed). -- JES, 2005-12-30
*/
-#define SIG_MEMORY_FAULT2 SIGBUS
+/* Hooking both SIGBUS and SIGSEGV causes troubles on some situation,
+ * so use a variable.
+ */
+extern int sig_memory_fault;
+#define SIG_MEMORY_FAULT (sig_memory_fault)
#define SIG_INTERRUPT_THREAD (SIGINFO)
#define SIG_STOP_FOR_GC (SIGUSR1)
| (sigaction_nodefer_works ? SA_NODEFER : 0);
#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
if((signal==SIG_MEMORY_FAULT)
-#ifdef SIG_MEMORY_FAULT2
- || (signal==SIG_MEMORY_FAULT2)
-#endif
#ifdef SIG_INTERRUPT_THREAD
|| (signal==SIG_INTERRUPT_THREAD)
#endif
;;; 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.10.3"
+"1.0.10.4"