1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

fix bug in with-fluids in a non-tail position

* libguile/vm-i-system.c (VM_DEFINE_INSTRUCTION): Drop the stack items
  corresponding the the with-fluids object. Thanks very much to Stefan
  Israelsson Tampe for the fix.
This commit is contained in:
Andy Wingo 2010-10-13 21:18:44 +02:00
parent e78d4bf9a9
commit 2b41a37b3c

View file

@ -1575,11 +1575,12 @@ VM_DEFINE_INSTRUCTION (89, wind_fluids, "wind-fluids", 1, -1, 0)
unsigned n = FETCH ();
SCM wf;
if (sp - 2*n < SCM_FRAME_UPPER_ADDRESS (fp))
goto vm_error_stack_underflow;
SYNC_REGISTER ();
wf = scm_i_make_with_fluids (n, sp + 1 - 2*n, sp + 1 - n);
sp -= 2 * n;
CHECK_UNDERFLOW ();
wf = scm_i_make_with_fluids (n, sp + 1, sp + 1 + n);
NULLSTACK (2 * n);
scm_i_swap_with_fluids (wf, dynstate);
scm_i_set_dynwinds (scm_cons (wf, scm_i_dynwinds ()));
NEXT;