mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
Fix "VM never extends vp->sp ..." commit
* libguile/vm.c (vm_expand_stack): Make sure the new SP is visible to vm_error if we throw because of stack overflow.
This commit is contained in:
parent
24af549ac1
commit
2a62eda85a
1 changed files with 3 additions and 4 deletions
|
@ -1018,7 +1018,7 @@ vm_expand_stack (struct scm_vm *vp, SCM *new_sp)
|
|||
SCM *fp;
|
||||
if (vp->fp)
|
||||
vp->fp += reloc;
|
||||
vp->sp_max_since_gc += reloc;
|
||||
new_sp += reloc;
|
||||
fp = vp->fp;
|
||||
while (fp)
|
||||
{
|
||||
|
@ -1031,10 +1031,10 @@ vm_expand_stack (struct scm_vm *vp, SCM *new_sp)
|
|||
fp = next_fp;
|
||||
}
|
||||
}
|
||||
|
||||
new_sp += reloc;
|
||||
}
|
||||
|
||||
vp->sp_max_since_gc = vp->sp = new_sp;
|
||||
|
||||
if (stack_size >= vp->max_stack_size)
|
||||
{
|
||||
/* Expand the soft limit by 256K entries to give us space to
|
||||
|
@ -1055,7 +1055,6 @@ vm_expand_stack (struct scm_vm *vp, SCM *new_sp)
|
|||
}
|
||||
|
||||
/* Otherwise continue, with the new enlarged stack. */
|
||||
vp->sp_max_since_gc = vp->sp = new_sp;
|
||||
}
|
||||
|
||||
static struct scm_vm *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue