develooper Front page | perl.perl5.porters | Postings from April 2015

Re: [perl #123954] Perl_pp_substcont: Assertion `((sv)->sv_flags &0x00000400)' failed (pp_ctl.c:318)

Thread Previous
From:
Dave Mitchell
Date:
April 22, 2015 11:33
Subject:
Re: [perl #123954] Perl_pp_substcont: Assertion `((sv)->sv_flags &0x00000400)' failed (pp_ctl.c:318)
Message ID:
20150422113305.GC4035@iabyn.com
On Sat, Mar 28, 2015 at 06:51:34PM -0700, Brian Carpenter via RT wrote:
> I stumbled onto a new test case that triggers this in v5.21.11 (v5.21.10-31-g008e8e8):
> 
> $ perl -e '$_=0;s;0*;$_---{};ge;()'
> perl: pp_ctl.c:318: Perl_pp_substcont: Assertion `((sv)->sv_flags & 0x00000400)' failed.
> Aborted
> 
> No error message or any kind of output with v5.21.7 (v5.21.6-602-ge9d2bd8).

Fixed with the following:

commit a911bb254071ab7112c309e8245494c182ad9fe2
Author:     David Mitchell <davem@iabyn.com>
AuthorDate: Wed Apr 22 12:27:36 2015 +0100
Commit:     David Mitchell <davem@iabyn.com>
CommitDate: Wed Apr 22 12:27:36 2015 +0100

    s/.../$_++/ge assertion failure
    
    The code that updated pos() on a match string assumed that it was SvPOK().
    Cunning code like the following converted $_ to SvIOK only:
    
        $_ = 0;
        s/.?/$_++/ge;


-- 
O Unicef Clearasil!
Gibberish and Drivel!
    -- "Bored of the Rings"

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