Skip to content

Commit

Permalink
Merge dc44b36 into 310f47b
Browse files Browse the repository at this point in the history
  • Loading branch information
richardleach committed Jul 3, 2021
2 parents 310f47b + dc44b36 commit 224623e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 0 additions & 6 deletions av.c
Expand Up @@ -170,12 +170,6 @@ Perl_av_extend_guts(pTHX_ AV *av, SSize_t key, SSize_t *maxp, SV ***allocp,
to_null += newmax - *maxp;
*maxp = newmax;

/* See GH#18014 for discussion of when this might be needed: */
if (av == PL_curstack) { /* Oops, grew stack (via av_store()?) */
PL_stack_sp = *allocp + (PL_stack_sp - PL_stack_base);
PL_stack_base = *allocp;
PL_stack_max = PL_stack_base + newmax;
}
} else { /* there is no SV* array yet */
*maxp = key < 3 ? 3 : key;
{
Expand Down
5 changes: 5 additions & 0 deletions scope.c
Expand Up @@ -56,6 +56,11 @@ Perl_stack_grow(pTHX_ SV **sp, SV **p, SSize_t n)
Perl_croak(aTHX_ "Out of memory during stack extend");

av_extend(PL_curstack, current + n + extra);

PL_stack_sp = AvALLOC(PL_curstack) + (PL_stack_sp - PL_stack_base);
PL_stack_base = AvALLOC(PL_curstack);
PL_stack_max = PL_stack_base + AvMAX(PL_curstack);

#ifdef DEBUGGING
PL_curstackinfo->si_stack_hwm = current + n + extra;
#endif
Expand Down

0 comments on commit 224623e

Please sign in to comment.