summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-01-23 12:27:20 +0000
committerDavid Mitchell <davem@iabyn.com>2017-01-23 12:27:20 +0000
commit03fedefe18733baa9ed7c9c22bd816408d57de0d (patch)
tree4825192c060d2f9645ffc4cb363895399d24811c /op.c
parent4b6e9aa6aa2256da1ec7ed08f819cbf5d1463741 (diff)
downloadperl-03fedefe18733baa9ed7c9c22bd816408d57de0d.tar.gz
avoid sort assert failure after compile fail
RT #130617 in rpeep(), there's an assert that the optree is sane for the sort's codeblock. After compile errors, it isn;t necessary sane, so skip the assert in that case. I've also changed a kLISTOP->op_next into the equivalent but less obfuscated kid->op_next.
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/op.c b/op.c
index d2fd198ddf..0ba58c7ac2 100644
--- a/op.c
+++ b/op.c
@@ -14446,8 +14446,9 @@ Perl_rpeep(pTHX_ OP *o)
&& ( kid->op_targ == OP_NEXTSTATE
|| kid->op_targ == OP_DBSTATE ))
|| kid->op_type == OP_STUB
- || kid->op_type == OP_ENTER);
- nullop->op_next = kLISTOP->op_next;
+ || kid->op_type == OP_ENTER
+ || (PL_parser && PL_parser->error_count));
+ nullop->op_next = kid->op_next;
DEFER(nullop->op_next);
}