This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PL_curstackinfo->si_stack_hwm: gently restore
RT #131732
With v5.27.1-66-g87058c3, I introduced a DEBUGGING-only mechanism in the
runops loop for checking whether an op extended the stack by as many slots
as values it returned on the stack. It did this by setting a
high-water-mark just before calling each pp function, and checking its
result on return.
It saved and restored the old value of PL_curstackinfo->si_stack_hwm
whenever it entered or left a runops loop or did a JMPENV_PUSH /
JMPENV_POP. However, the restoring could restore to an old value that was
smaller than the current value, leading to false-positive stack-extend
panics. So only restore if the old value was larger.
In particular this was causing false positives in DBI.