diff options
author | Andy Wingo <wingo@pobox.com> | 2018-06-26 17:16:19 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-06-26 17:16:19 +0200 |
commit | 51e71a473f8ff114522a1b6fa054bdebeefb0575 (patch) | |
tree | 30888a9d6edfbb9648e08773e5e965bd15750ab0 /libguile/vm.c | |
parent | bf66fdca55f677195e7824946837e89f075bd262 (diff) | |
download | guile-51e71a473f8ff114522a1b6fa054bdebeefb0575.tar.gz |
Allow abort_to_prompt to avoid a longjmp
* libguile/vm-engine.c (abort):
* libguile/vm.c (abort_to_prompt): Allow fallthrough if longjmp isn't
needed.
Diffstat (limited to 'libguile/vm.c')
-rw-r--r-- | libguile/vm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/vm.c b/libguile/vm.c index 0d424ec11..45040993f 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -1403,11 +1403,11 @@ abort_to_prompt (scm_thread *thread, jmp_buf *current_registers) vp->sp = sp; vp->ip = ip; - /* Jump! */ - longjmp (*registers, 1); - - /* Shouldn't get here */ - abort (); + /* If there are intervening C frames, then jump over them, making a + nonlocal exit. Otherwise fall through and let the VM pick up where + it left off. */ + if (current_registers != registers) + longjmp (*registers, 1); } SCM |