File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use warnings;
1111use strict;
1212use Config;
1313# plan tests => 'no_plan'; # yet
14- plan tests => 34 ;
14+ plan tests => 35 ;
1515
1616our $TODO ;
1717
@@ -60,6 +60,16 @@ our $foo;
6060
6161# ##################
6262
63+ # [perl #29708] - goto &foo could leave foo() at depth two with
64+ # @_ == PL_sv_undef, causing a coredump
65+
66+ my $r = runperl(
67+ prog =>
68+ ' sub f { return if $d; $d=1; my $a=sub {goto &f}; &$a; f() } f(); print qq(ok\n)' ,
69+ stderr => 1
70+ );
71+ is($r , " ok\n " , ' avoid pad without an @_' );
72+
6373# see if a modified @_ propagates
6474{
6575 my $i ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use warnings;
1313use strict;
1414use Config;
1515# plan tests => 134;
16- plan tests => 101 ;
16+ plan tests => 100 ;
1717
1818our $TODO ;
1919
@@ -309,17 +309,6 @@ returned_label:
309309is($count , 1, ' called i_return_a_label' );
310310ok($ok , ' skipped to returned_label' );
311311
312- # [perl #29708] - goto &foo could leave foo() at depth two with
313- # @_ == PL_sv_undef, causing a coredump
314-
315-
316- $r = runperl(
317- prog =>
318- ' sub f { return if $d; $d=1; my $a=sub {goto &f}; &$a; f() } f(); print qq(ok\n)' ,
319- stderr => 1
320- );
321- is($r , " ok\n " , ' avoid pad without an @_' );
322-
323312goto moretests;
324313fail(' goto moretests' );
325314exit ;
You can’t perform that action at this time.
0 commit comments