diff options
Diffstat (limited to 'runtime/fail_nat.c')
-rw-r--r-- | runtime/fail_nat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/fail_nat.c b/runtime/fail_nat.c index ec5bfebc96..c372bc14f8 100644 --- a/runtime/fail_nat.c +++ b/runtime/fail_nat.c @@ -31,6 +31,8 @@ #include "caml/roots.h" #include "caml/callback.h" +extern void caml_terminate_signals(void); + /* The globals holding predefined exceptions */ typedef value caml_generated_constant[1]; @@ -60,7 +62,10 @@ char * caml_exception_pointer = NULL; void caml_raise(value v) { Unlock_exn(); - if (caml_exception_pointer == NULL) caml_fatal_uncaught_exception(v); + if (caml_exception_pointer == NULL) { + caml_terminate_signals(); + caml_fatal_uncaught_exception(v); + } while (caml_local_roots != NULL && (char *) caml_local_roots < caml_exception_pointer) { |