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

Re: [perl #129119] Assertion Failure: pp_ctl.c:5140: MAGIC*S_doparseform(SV *)

Thread Previous
From:
Dave Mitchell
Date:
March 29, 2017 14:39
Subject:
Re: [perl #129119] Assertion Failure: pp_ctl.c:5140: MAGIC*S_doparseform(SV *)
Message ID:
20170329143916.GK3342@iabyn.com
On Wed, Sep 07, 2016 at 12:54:02PM -0700, Father Chrysostomos via RT wrote:
> On Sun Aug 28 20:39:54 2016, dcollinsn@gmail.com wrote:
> > On Sun Aug 28 18:21:51 2016, brian.carpenter@gmail.com wrote:
> > > Perl v5.25.4-20-gc2f7c0b* and the attached script trigger this
> > > assertion failure. Minimizing the script with afl-tmin caused the
> > > assertion to go away.
> > >
> > > perl: pp_ctl.c:5140: MAGIC *S_doparseform(SV *): Assertion
> > > `!((((_svpvx)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) &&
> > > (((svtype)((_svpvx)->sv_flags & 0xff)) == SVt_PVGV ||
> > > ((svtype)((_svpvx)->sv_flags & 0xff)) == SVt_PVLV))' failed.
> > 
> > Minimized by hand to:
> > 
> > ./perl -e 'print "map{formline*0}<DATA>__END__\n\n0"' | ./perl -Ilib
> 
> $ ./miniperl -e 'formline *0 for "", 0'
> Assertion failed: (!isGV_with_GP(_svpvx)), function S_doparseform, file pp_ctl.c, line 5140.
> Abort trap: 6

Fixed by the following; closing

Author: Tony Cook <tony@develop-help.com>
Date:   Tue Feb 7 16:14:53 2017 +1100

    (perl #130722) don't call SvPVX() on a glob
    
    S_doparseform() called SvPVX() on the format argument, which
    produced an assertion failure when the format was supplied as a
    glob.
    
    Since S_doparseform() calls SvPV() initially and stores the result,
    just use that result.


-- 
Counsellor Troi states something other than the blindingly obvious.
    -- Things That Never Happen in "Star Trek" #16

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