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

Re: [perl #125972] Segfault on bareword as loop index

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
March 25, 2016 11:27
Subject:
Re: [perl #125972] Segfault on bareword as loop index
Message ID:
20160325112657.GF29332@iabyn.com
On Fri, Sep 04, 2015 at 08:11:04PM +0100, Zefram wrote:
> Nicolas Mendoza via RT wrote:
> >Program received signal SIGSEGV, Segmentation fault.
> >0x000000000052ffe1 in Perl_my_atof (my_perl=my_perl@entry=0x7a9010, s=0x7d8f40 "b") at numeric.c:857
> 
> That's DECLARE_STORE_LC_NUMERIC_SET_TO_NEEDED().  Presumably failing via
> the need to check lexical locale flags, which tries to use PL_curcop.
> Both the apparent breaking and apparent fixing commits were concerned
> with cops, but the nature of the apparent fixing one doesn't fill me
> with confidence that the problem is really fixed.  You should look at
> the state of PL_curcop at the moment of segv: I'm pretty sure it's either
> null or pointing at a broken op structure.

Looking at this further, the SEGV in 5.20.0 happened due the "delete spare
COP when two are adjacent" code in rpeep. That code was calling
S_cop_free(), which after v5.19.2-370-g515abc4 sets PL_curcop to NULL if
PL_curcop is the cop being freed.

The simplified deduplication code introduced by v5.21.4-465-gf5b5c2a
doesn't call S_cop_free() any more, so its no longer an issue.

So I'll close this ticket.

-- 
All wight. I will give you one more chance. This time, I want to hear
no Wubens. No Weginalds. No Wudolf the wed-nosed weindeers.
    -- Life of Brian

Thread Previous | Thread Next


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