diff options
| author | Guillaume Munch-Maccagnoni | 2019-11-16 22:48:49 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2019-12-17 17:05:09 +0100 |
| commit | 2bac2cf5ec97a0b0f9a509368077984d6e399038 (patch) | |
| tree | ffb2f62612fbdd509a7dfa115e475b6aedcd714d /kernel/byterun | |
| parent | 829f9385813b3d2ff45b8bec5f8741d51333c270 (diff) | |
Fatal error in VM if SIGINT was seen but no exception occured.
Diffstat (limited to 'kernel/byterun')
| -rw-r--r-- | kernel/byterun/coq_interp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/byterun/coq_interp.c b/kernel/byterun/coq_interp.c index 9a1149bd86..dd3ff0302e 100644 --- a/kernel/byterun/coq_interp.c +++ b/kernel/byterun/coq_interp.c @@ -522,8 +522,13 @@ value coq_interprete #else if (caml_signals_are_pending) { /* If there's a Ctrl-C, we reset the vm */ - if (caml_pending_signals[SIGINT]) { coq_sp = coq_stack_high; } + intnat sigint = caml_pending_signals[SIGINT]; + if (sigint) { coq_sp = coq_stack_high; } caml_process_pending_signals(); + if (sigint) { + caml_failwith("Coq VM: Fatal error: SIGINT signal detected " + "but no exception was raised"); + } } #endif Next; |
