diff options
author | Andy Wingo <wingo@pobox.com> | 2018-09-03 18:30:45 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-09-03 18:31:41 +0200 |
commit | babd4118c2dc2d6fc7866447efcad616963db0c8 (patch) | |
tree | a1485bbfc511b82dbd7c740e89eae2e8708293f2 | |
parent | 24b4d09394561b23f88c11741236fa43c5d7112d (diff) | |
download | guile-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.c | 4 |
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 = ®isters; + 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 = ®isters; ret = vm_engines[vp->engine](thread); thread->vm.registers = prev_registers; |