develooper Front page | perl.perl5.porters | Postings from August 2010

Re: [perl #76870] sigsegv in 5.10.1

Thread Previous
From:
Dave Mitchell
Date:
August 24, 2010 14:48
Subject:
Re: [perl #76870] sigsegv in 5.10.1
Message ID:
20100824214816.GE20209@iabyn.com
On Sun, Aug 01, 2010 at 09:19:12PM -0400, Alex Vandiver wrote:
> At Sat Jul 31 08:31:51 -0400 2010, jettero@cpan.org (via RT) wrote:
> > This bug is probably known and fixed.  I appologize in advance
> > that I don't really know where to check for that.  I did flip
> > through some git commits and perl deltas trying to decide if the
> > bug was really known or incidentally fixed while acheiving other
> > goals.  In any case, it doesn't apply to more modern perls, but
> > 5.10.x seems to be deployed everywhere so it is perhaps worth
> > pointing out.
> > 
> > #!/usr/bin/perl
> > 
> > eval { ("3"."x"x25) =~ m/(\d+)(??{ _noexist($^N) })/; 1 }
> > 
> >     # the sagfault will occur in whatever happens to be the next op
> > 
> >     or warn $@; # SIGSEGV in Perl_pp_warn() or comment line for
> >     ;print "here\n"; # SIGSEGV in Perl_do_print() instead
> > 
> > 
> > # 5.6.1  seems unaffected
> > # 5.8.1  seems to work but complains: panic: pad_free curpad. after "here"
> > # 5.10.1 where I noticed this (ubuntu 10.04)
> > # 5.12   seems fine
> > # 5.13   also fine
> 
> This bug seems to be only trigged with -Dusethreads, and was fixed by
> f7461760003db2ce68155c97ea6c1658e96fcd27.  Unfortunately, as that was
> a fairly complex feature addition, it's not a good contender to be
> cherry-picked into maint-5.12.

Valgrind shows that there's still an underlying issue in blead, it just
happens to no longer manifest itself as a SEGV. I'm re-opening this
ticket and adding it to
    '#34161: METABUG - (?{...}) and (??{...}) regexp issues'

[davem@pigeon bleed]$ valgrind ./perl -Ilib /tmp/p
==4618== Memcheck, a memory error detector
==4618== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==4618== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==4618== Command: ./perl -Ilib /tmp/p
==4618== 
Undefined subroutine &main::_noexist called at (re_eval 1) line 1.
	...caught at /tmp/p line 3.
==4618== Invalid read of size 8
==4618==    at 0x5641FA: Perl_pp_const (pp_hot.c:44)
==4618==    by 0x52154C: Perl_runops_debug (dump.c:2112)
==4618==    by 0x45314E: S_run_body (perl.c:2310)
==4618==    by 0x4523FC: perl_run (perl.c:2239)
==4618==    by 0x41F82C: main (perlmain.c:117)
==4618==  Address 0x4c84098 is not stack'd, malloc'd or (recently) free'd
==4618== 
==4618== Invalid read of size 4
==4618==    at 0x6C82EF: Perl_do_print (doio.c:1210)
==4618==    by 0x56DCC1: Perl_pp_print (pp_hot.c:791)
==4618==    by 0x52154C: Perl_runops_debug (dump.c:2112)
==4618==    by 0x45314E: S_run_body (perl.c:2310)
==4618==    by 0x4523FC: perl_run (perl.c:2239)
==4618==    by 0x41F82C: main (perlmain.c:117)
==4618==  Address 0x9c is not stack'd, malloc'd or (recently) free'd


-- 
Please note that ash-trays are provided for the use of smokers,
whereas the floor is provided for the use of all patrons.
    -- Bill Royston

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