Message-ID: <
20030318215505.A16787@fdgroup.com>
p4raw-id: //depot/perl@19025
}
/* First do some returnish stuff. */
+ SvREFCNT_inc(cv); /* avoid premature free during unwind */
FREETMPS;
cxix = dopoptosub(cxstack_ix);
if (cxix < 0)
/* Now do some callish stuff. */
SAVETMPS;
+ SAVEFREESV(cv); /* later, undo the 'avoid premature free' hack */
if (CvXSUB(cv)) {
#ifdef PERL_XSUB_OLDSTYLE
if (CvOLDSTYLE(cv)) {
# "This IS structured code. It's just randomly structured."
-print "1..27\n";
+print "1..28\n";
while ($?) {
$foo = 1;
print "ok 27 - weird case of goto and for(;;) loop\n";
}
+# bug #9990 - don't prematurely free the CV we're &going to.
+
+sub f1 {
+ my $x;
+ goto sub { $x; print "ok 28 - don't prematurely free CV\n" }
+}
+f1();
+
exit;
bypass: