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

Re: [perl #126613] Segmentation fault in S_do_trans_count

Thread Previous
From:
Dave Mitchell
Date:
March 30, 2017 08:50
Subject:
Re: [perl #126613] Segmentation fault in S_do_trans_count
Message ID:
20170330085045.GS3342@iabyn.com
On Sun, Nov 15, 2015 at 10:29:55PM -0700, Karl Williamson wrote:
> On 11/15/2015 09:51 PM, Aristotle Pagaltzis wrote:
> > * Dan Collins <perlbug-followup@perl.org> [2015-11-11 04:05]:
> > > /(?{s0})|(?{s0:})/|s|||eg|y|||
> > 
> > This does not reproduce on 5.16.1.
> > 
> > The general form turns out to be
> > 
> >      /(?{ 'string' })|(?{ LABEL: })/ | s///eg | y///
> > 
> > Removing the /e on the substitution causes it to throw an exception that
> > terminates the program before it crashes:
> > 
> >      Can't coerce UNKNOWN to string in substitution (s///) at t.pl line 1.
> > 
> > Putting an eval{} around the substitution to prevent the exception from
> > terminating the program reveals that it goes on to crash just as before.
> > So this error message is likely pointing out (half of) the culprit.
> > 
> 
> I bisected this with this result:
> There are only 'skip'ped commits left to test.
> The first bad commit could be any of:
> 81ed78b25c4b95fc36897169c53a46cae7104064
> b0812ba3f1b20f0b21a4654f2c33c2cc14e1c0fb
> We cannot bisect more!
> bisect run cannot continue any more
> Died at ../blead/Porting/bisect.pl line 267.
> That took 863 seconds.
> 
> 
> The first commit is
> commit 81ed78b25c4b95fc36897169c53a46cae7104064
>  Author: David Mitchell <davem@iabyn.com>
>  Date:   Fri May 4 16:34:01 2012 +0100
> 
>      make calling of /(?{}) code blocks correct
>      ....
> 
> The second is
>  commit b0812ba3f1b20f0b21a4654f2c33c2cc14e1c0fb
>  Author: David Mitchell <davem@iabyn.com>
>  Date:   Tue Jun 5 22:29:23 2012 +0100
> 
>      make perl build again on non-DEBUGGING builds
> 
>      The PL_block_type debugging-only array is now used indeirectly in
>      ext/re/re-exec.c, which enables debugging even on non-debugging builds

The problem appears to have gone away in 5.23.8, so I'll close this
ticket. The fix bisects to

commit 1dfbe6b4adf94405803bd5ecb5c549061eaede69
Author: David Mitchell <davem@iabyn.com>
Date:   Sat Jul 11 14:42:56 2015 +0100

    add old_tmpsfloor field to CXt_SUB context frame
    
    Rather than saving and restoring PL_tmps_floor on subroutine entry/exit
    by using SAVETMPS and the save stack, store the old value directly
    in the context struct and make PUSHSUB/POPSUB handle the saving and
    restoring.


-- 
Art is anything that has a label (especially if the label is "untitled 1")

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