develooper Front page | perl.perl5.porters | Postings from January 2017

Re: [perl #130617] op.c:14389: Perl_rpeep: Assertion `(kid->op_type== OP_NULL && ( kid->op_targ == OP_NEXTSTATE || kid->op_targ == OP_DBSTATE ))|| kid->op_type == OP_STUB || kid->op_type == OP_ENTER' failed

Thread Previous
From:
Dave Mitchell
Date:
January 23, 2017 12:36
Subject:
Re: [perl #130617] op.c:14389: Perl_rpeep: Assertion `(kid->op_type== OP_NULL && ( kid->op_targ == OP_NEXTSTATE || kid->op_targ == OP_DBSTATE ))|| kid->op_type == OP_STUB || kid->op_type == OP_ENTER' failed
Message ID:
20170123123616.GA4206@iabyn.com
On Sun, Jan 22, 2017 at 04:18:13AM -0800, Sergey Aleynikov wrote:
> While fuzzing perl v5.25.8-216-gfbceb79751 built with afl and run
> under libdislocator, I found the following program
> 
> }my;0=sort{i d&0}0
> 
> to cause an assertion failure, even when run under -c for a syntax
> check. This is a regression between v5.18.4 and v5.20.0, bisect points to

Fixed with the following commit. It's yet another example of the
difficulty of attempting to continue parsing after an error has been
encountered.


commit 03fedefe18733baa9ed7c9c22bd816408d57de0d
Author:     David Mitchell <davem@iabyn.com>
AuthorDate: Mon Jan 23 12:27:20 2017 +0000
Commit:     David Mitchell <davem@iabyn.com>
CommitDate: Mon Jan 23 12:27:20 2017 +0000

    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.


-- 
Technology is dominated by two types of people: those who understand what
they do not manage, and those who manage what they do not understand. 

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About