1.0.24.42: fix bug 235a
[sbcl.git] / src / runtime / x86-64-darwin-os.c
index c1055c0..6542978 100644 (file)
@@ -281,7 +281,7 @@ control_stack_exhausted_handler(int signal, siginfo_t *siginfo, void *void_conte
     os_context_t *context = arch_os_get_context(&void_context);
 
     arrange_return_to_lisp_function
-        (context, SymbolFunction(CONTROL_STACK_EXHAUSTED_ERROR));
+        (context, StaticSymbolFunction(CONTROL_STACK_EXHAUSTED_ERROR));
 }
 
 void
@@ -289,7 +289,7 @@ undefined_alien_handler(int signal, siginfo_t *siginfo, void *void_context) {
     os_context_t *context = arch_os_get_context(&void_context);
 
     arrange_return_to_lisp_function
-        (context, SymbolFunction(UNDEFINED_ALIEN_VARIABLE_ERROR));
+        (context, StaticSymbolFunction(UNDEFINED_ALIEN_VARIABLE_ERROR));
 }
 
 kern_return_t
@@ -359,6 +359,10 @@ catch_exception_raise(mach_port_t exception_port,
 
             backup_thread_state = thread_state;
             open_stack_allocation(&thread_state);
+            /* Reserve a 256 byte zone for signal handlers
+             * to use on the interrupted thread stack.
+             */
+            stack_allocate(&thread_state, 256);
 
             /* Save thread state */
             target_thread_state =
@@ -399,6 +403,7 @@ catch_exception_raise(mach_port_t exception_port,
                  addr < undefined_alien_address + os_vm_page_size) {
             backup_thread_state = thread_state;
             open_stack_allocation(&thread_state);
+            stack_allocate(&thread_state, 256);
 
             /* Save thread state */
             target_thread_state =
@@ -428,6 +433,7 @@ catch_exception_raise(mach_port_t exception_port,
 
             backup_thread_state = thread_state;
             open_stack_allocation(&thread_state);
+            stack_allocate(&thread_state, 256);
 
             /* Save thread state */
             target_thread_state =
@@ -504,6 +510,7 @@ catch_exception_raise(mach_port_t exception_port,
 
             backup_thread_state = thread_state;
             open_stack_allocation(&thread_state);
+            stack_allocate(&thread_state, 256);
 
             /* Save thread state */
             target_thread_state =