diff options
author | Hugo van der Sanden <hv@crypt.org> | 2002-01-08 19:17:50 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-08 19:13:43 +0000 |
commit | f9dc862fc43278b696e6cacef943fbe534e5baba (patch) | |
tree | b4be8b2e0f1796edceff46f43b46c200c2b1e894 | |
parent | 895148d443b27e3e0cafc490f243682cd8a265ef (diff) | |
download | perl-f9dc862fc43278b696e6cacef943fbe534e5baba.tar.gz |
[patch] peep() is rude
Message-Id: <200201081917.g08JHoW15789@crypt.compulink.co.uk>
p4raw-id: //depot/perl@14139
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | t/run/kill_perl.t | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -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 e568afe1ed..c2eb01f5ff 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 |