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

Fix stale stack frame clearing for frame size change

* libguile/vm-engine.c (return-values): Clear all 3 stack slots.  Not
  sure this is necessary though!
This commit is contained in:
Andy Wingo 2018-07-19 13:54:55 +02:00
parent c2a8224a63
commit 9b70129504

View file

@ -545,14 +545,15 @@ VM_NAME (scm_thread *thread)
VM_DEFINE_OP (9, return_values, "return-values", OP1 (X32))
{
union scm_vm_stack_element *old_fp;
size_t frame_size = 3;
old_fp = VP->fp;
ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (VP->fp);
VP->fp = SCM_FRAME_DYNAMIC_LINK (VP->fp);
/* Clear stack frame. */
old_fp[0].as_scm = SCM_BOOL_F;
old_fp[1].as_scm = SCM_BOOL_F;
while (frame_size--)
old_fp[frame_size].as_scm = SCM_BOOL_F;
POP_CONTINUATION_HOOK (old_fp);