summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-09-03 18:30:45 +0200
committerAndy Wingo <wingo@pobox.com>2018-09-03 18:31:41 +0200
commitbabd4118c2dc2d6fc7866447efcad616963db0c8 (patch)
treea1485bbfc511b82dbd7c740e89eae2e8708293f2
parent24b4d09394561b23f88c11741236fa43c5d7112d (diff)
downloadguile-babd4118c2dc2d6fc7866447efcad616963db0c8.tar.gz
Fix nonlocal abort to compiled continuation
* libguile/vm.c (scm_call_n): Fix failure to reset vm.registers after a nonlocal abort to a compiled continuation.
-rw-r--r--libguile/vm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libguile/vm.c b/libguile/vm.c
index 83d0edda0..76c3e90a6 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -1466,6 +1466,9 @@ scm_call_n (SCM proc, SCM *argv, size_t nargs)
SCM ret;
resume = setjmp (registers);
+
+ thread->vm.registers = &registers;
+
if (SCM_UNLIKELY (resume))
{
uint8_t *mcode = vp->mra_after_abort;
@@ -1479,7 +1482,6 @@ scm_call_n (SCM proc, SCM *argv, size_t nargs)
else
vp->ip = get_callee_vcode (thread);
- thread->vm.registers = &registers;
ret = vm_engines[vp->engine](thread);
thread->vm.registers = prev_registers;