X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-darwin-os.c;h=bf127b69749408b46deedee97aade5559320a9a6;hb=5877e8c2334bd87490be385af21ed9bc494f19e2;hp=8489322b71dbd261ecdf65a41fb4084e6f5bb84b;hpb=9644b3bcfc539ab201da9d3251a3cc3ebc24d457;p=sbcl.git diff --git a/src/runtime/x86-darwin-os.c b/src/runtime/x86-darwin-os.c index 8489322..bf127b6 100644 --- a/src/runtime/x86-darwin-os.c +++ b/src/runtime/x86-darwin-os.c @@ -504,6 +504,9 @@ catch_exception_raise(mach_port_t exception_port, call_handler_on_thread(thread, &thread_state, signal, &siginfo, handler); } + if (current_mach_task == MACH_PORT_NULL) + current_mach_task = mach_task_self(); + dealloc_ret = mach_port_deallocate (current_mach_task, thread); if (dealloc_ret) { lose("mach_port_deallocate (thread) failed with return_code %d\n", dealloc_ret);