From 2bac2cf5ec97a0b0f9a509368077984d6e399038 Mon Sep 17 00:00:00 2001 From: Guillaume Munch-Maccagnoni Date: Sat, 16 Nov 2019 22:48:49 +0100 Subject: Fatal error in VM if SIGINT was seen but no exception occured. --- kernel/byterun/coq_interp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'kernel') 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; -- cgit v1.2.3