diff options
author | David Mitchell <davem@iabyn.com> | 2017-01-23 12:27:20 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-01-23 12:27:20 +0000 |
commit | 03fedefe18733baa9ed7c9c22bd816408d57de0d (patch) | |
tree | 4825192c060d2f9645ffc4cb363895399d24811c /op.c | |
parent | 4b6e9aa6aa2256da1ec7ed08f819cbf5d1463741 (diff) | |
download | perl-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); } |