X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fwin32-os.c;h=e4620f8ea9c6e69c40f99e783952a5f91c405286;hb=821de1a3e534e11b682475ebaf836ffa846246f4;hp=92917e939d6f3367bac1accf321ac4bc3d5e58ec;hpb=db26c127bc13e8a4e3f56bef25fc18d2ba16aa1d;p=sbcl.git diff --git a/src/runtime/win32-os.c b/src/runtime/win32-os.c index 92917e9..e4620f8 100644 --- a/src/runtime/win32-os.c +++ b/src/runtime/win32-os.c @@ -43,6 +43,7 @@ #include "runtime.h" #include "alloc.h" #include "genesis/primitive-objects.h" +#include "dynbind.h" #include #include @@ -320,8 +321,18 @@ EXCEPTION_DISPOSITION handle_exception(EXCEPTION_RECORD *exception_record, struct lisp_exception_frame *exception_frame, CONTEXT *context, - void *dc) /* FIXME: What's dc again? */ + void *dispatcher_context) { + if (exception_record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) { + /* If we're being unwound, be graceful about it. */ + + /* Undo any dynamic bindings. */ + unbind_to_here(exception_frame->bindstack_pointer, + arch_os_get_current_thread()); + + return ExceptionContinueSearch; + } + /* For EXCEPTION_ACCESS_VIOLATION only. */ void *fault_address = (void *)exception_record->ExceptionInformation[1];