Fix for:
bstrand@switchmanagement.com [Tue, 12 Apr 2005 19:12:58 +0000 (19:12 +0000)]
[perl #34934] perl 5.8.5 on x86 and x86-64 hang at compile-time
From: bstrand@switchmanagement.com (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-34934-110595.15.9181274318682@perl.org>

This syntax error now produces a panic message.

p4raw-id: //depot/perl@24237

op.c

diff --git a/op.c b/op.c
index 3bd6648..747f1c5 100644 (file)
--- a/op.c
+++ b/op.c
@@ -5575,6 +5575,8 @@ Perl_ck_grep(pTHX_ OP *o)
        OP* k;
        o = ck_sort(o);
         kid = cLISTOPo->op_first->op_sibling;
+       if (!cUNOPx(kid)->op_next)
+           Perl_croak(aTHX_ "panic: ck_grep");
        for (k = cUNOPx(kid)->op_first; k; k = k->op_next) {
            kid = k;
        }