This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add stack extend to Perl_die_unwind()
When invoked via a scalar-context eval, die_unwind() was pushing
&PL_sv_undef without extending the stack first. It's been this way for
many years. Spotted by visual inspection while adding rpp_() code.
I could get a SEGV with the following code, but I haven't added it as a
test as it's highly sensitive to exactly what size stack is initially
allocated and the OS's malloc().
my $x;
my @a =
($x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,
scalar eval { die },
);