From: Gurusamy Sarathy Date: Tue, 13 Oct 1998 01:49:16 +0000 (+0000) Subject: don't longjmp() in pp_goto() (regressive bug from old single-stack X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be4f712a01f8cac0b4b4290efd894c00a5af5374;p=p5sagit%2Fp5-mst-13.2.git don't longjmp() in pp_goto() (regressive bug from old single-stack implementation) p4raw-id: //depot/perl@1941 --- diff --git a/pp_ctl.c b/pp_ctl.c index 8d43291..b566738 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2204,11 +2204,6 @@ PP(pp_goto) PL_do_undump = FALSE; } - if (PL_top_env->je_prev) { - PL_restartop = retop; - JMPENV_JUMP(3); - } - RETURNOP(retop); } diff --git a/t/op/runlevel.t b/t/op/runlevel.t index 307e2a0..bff3c36 100755 --- a/t/op/runlevel.t +++ b/t/op/runlevel.t @@ -315,3 +315,23 @@ main|-|9|main::__ANON__ In DIE main|-|10|(eval) main|-|10|main::foo +######## +package TEST; + +sub TIEARRAY { + return bless [qw(foo fee fie foe)], $_[0]; +} +sub FETCH { + my ($s,$i) = @_; + if ($i) { + goto bbb; + } +bbb: + return $s->[$i]; +} + +package main; +tie my @bar, 'TEST'; +print join('|', @bar[0..3]), "\n"; +EXPECT +foo|fee|fie|foe