[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/03: Fix nonlocal abort to compiled continuation
From: |
Andy Wingo |
Subject: |
[Guile-commits] 03/03: Fix nonlocal abort to compiled continuation |
Date: |
Mon, 3 Sep 2018 12:32:13 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit babd4118c2dc2d6fc7866447efcad616963db0c8
Author: Andy Wingo <address@hidden>
Date: Mon Sep 3 18:30:45 2018 +0200
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.
---
libguile/vm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libguile/vm.c b/libguile/vm.c
index 83d0edd..76c3e90 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;