Skip to content

Commit e1381e7

Browse files
committed
Move 1 more test
1 parent c18964b commit e1381e7

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

t/op/goto-amp-name.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use warnings;
1111
use strict;
1212
use Config;
1313
#plan tests => 'no_plan'; # yet
14-
plan tests => 34;
14+
plan tests => 35;
1515

1616
our $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;

t/op/goto.t

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use warnings;
1313
use strict;
1414
use Config;
1515
#plan tests => 134;
16-
plan tests => 101;
16+
plan tests => 100;
1717

1818
our $TODO;
1919

@@ -309,17 +309,6 @@ returned_label:
309309
is($count, 1, 'called i_return_a_label');
310310
ok($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-
323312
goto moretests;
324313
fail('goto moretests');
325314
exit;

0 commit comments

Comments
 (0)