From: Jarkko Hietaniemi Date: Sun, 10 Aug 2003 19:45:45 +0000 (+0000) Subject: Retract #20597, too many resulting core dumps. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2affe78f01f9cd3aae1b214beb9140e1fe830c7d;p=p5sagit%2Fp5-mst-13.2.git Retract #20597, too many resulting core dumps. p4raw-id: //depot/perl@20602 --- diff --git a/pad.c b/pad.c index a121e53..90d9979 100644 --- a/pad.c +++ b/pad.c @@ -258,15 +258,9 @@ Perl_pad_undef(pTHX_ CV* cv) { assert(CvWEAKOUTSIDE(innercv)); CvWEAKOUTSIDE_off(innercv); + CvOUTSIDE(innercv) = outercv; CvOUTSIDE_SEQ(innercv) = seq; - /* don't relink to grandfather if he's being freed */ - if (SvREFCNT(outercv)) { - CvOUTSIDE(innercv) = outercv; - SvREFCNT_inc(outercv); - } - else { - CvOUTSIDE(innercv) = Nullcv; - } + SvREFCNT_inc(outercv); } } } diff --git a/t/op/closure.t b/t/op/closure.t index 763e2a7..dd7b50c 100755 --- a/t/op/closure.t +++ b/t/op/closure.t @@ -13,7 +13,7 @@ BEGIN { use Config; -print "1..185\n"; +print "1..184\n"; my $test = 1; sub test (&) { @@ -641,27 +641,4 @@ f16302(); test { $a{7}->()->() + $a{11}->()->() == 18 }; } -# bugid #23265 - this used to coredump during destruction of PL_maincv -# and its children - -require './test.pl'; - -my $got = runperl( - prog => q[ - print - sub {$_[0]->(@_)} -> ( - sub { - $_[1] - ? $_[0]->($_[0], $_[1] - 1) . sub {"x"}->() - : "y" - }, - 2 - ) - , "\n" - ; - - ], - stderr => 1 -); -test { $got eq "yxx\n" };