X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-64-darwin-os.c;h=3c06b56350fffd92c18abf07dacd488913fe362b;hb=c8617f57d0413beb2890e94dabe227cef9c5ddad;hp=6378d7b018d918d37617158b00980c5a2a656c5a;hpb=578362575fc2112b828597cc1025e3ead43d43ba;p=sbcl.git diff --git a/src/runtime/x86-64-darwin-os.c b/src/runtime/x86-64-darwin-os.c index 6378d7b..3c06b56 100644 --- a/src/runtime/x86-64-darwin-os.c +++ b/src/runtime/x86-64-darwin-os.c @@ -574,6 +574,9 @@ catch_exception_raise(mach_port_t exception_port, ret = KERN_INVALID_RIGHT; } + 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);