@_ sometimes wasn't getting created right
p4raw-id: //depot/perl@22870
=cut
*/
+/* XXX pad_push is now always called with has_args == 1. Get rid of
+ * this arg at some point */
+
void
Perl_pad_push(pTHX_ PADLIST *padlist, int depth, int has_args)
{
else {
if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION))
sub_crush_depth(cv);
- pad_push(padlist, CvDEPTH(cv), cx->blk_sub.hasargs);
+ pad_push(padlist, CvDEPTH(cv), 1);
}
PAD_SET_CUR(padlist, CvDEPTH(cv));
if (cx->blk_sub.hasargs)
@INC = qw(. ../lib);
}
-print "1..32\n";
+print "1..33\n";
require "test.pl";
print "not ";
returned_label : print "ok 32 - done to returned_label\n";
+# [perl #29708] - goto &foo could leave foo() at depth two with
+# @_ == PL_sv_undef, causing a coredump
+
+
+my $r = runperl(
+ prog =>
+ 'sub f { return if $d; $d=1; my $a=sub {goto &f}; &$a; f() } f(); print qq(ok\n)',
+ stderr => 1
+ );
+print "not " if $r ne "ok\n";
+print "ok 33 - avoid pad without an \@_\n";
+
+
exit;
bypass: