From: Hugo van der Sanden Date: Tue, 8 Jan 2002 19:17:50 +0000 (+0000) Subject: [patch] peep() is rude X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9dc862fc43278b696e6cacef943fbe534e5baba;p=p5sagit%2Fp5-mst-13.2.git [patch] peep() is rude Message-Id: <200201081917.g08JHoW15789@crypt.compulink.co.uk> p4raw-id: //depot/perl@14139 --- diff --git a/op.c b/op.c index e4f84fa..c97dacd 100644 --- a/op.c +++ b/op.c @@ -7035,7 +7035,7 @@ Perl_peep(pTHX_ register OP *o) else if (o->op_next->op_type == OP_RV2AV) { OP* pop = o->op_next->op_next; IV i; - if (pop->op_type == OP_CONST && + if (pop && pop->op_type == OP_CONST && (PL_op = pop->op_next) && pop->op_next->op_type == OP_AELEM && !(pop->op_next->op_private & diff --git a/t/run/kill_perl.t b/t/run/kill_perl.t index e568afe..c2eb01f 100644 --- a/t/run/kill_perl.t +++ b/t/run/kill_perl.t @@ -816,3 +816,9 @@ ok print "ok" if 'X' =~ /\X/; EXPECT ok +######## segfault in 5.6.1 within peep() +@a = (1..9); +@b = sort { @c = sort { @d = sort { 0 } @a; @d; } @a; } @a; +print join '', @a, "\n"; +EXPECT +123456789