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

[perl #8870] recently-introduced regex segfault

From:
Steve Peters via RT
Date:
March 29, 2006 08:30
Subject:
[perl #8870] recently-introduced regex segfault
Message ID:
rt-3.0.11-8870-131641.10.2201809638278@perl.org
> [RT_System - Sat Mar 23 22:49:25 2002]:
> 
> > I think what causes the problem is this code in perl.h:
> > 
> >     #ifdef DEBUGGING
> >         sv_setpvn(PERL_DEBUG_PAD(0), "", 0);
> >         sv_setpvn(PERL_DEBUG_PAD(1), "", 0);
> >         sv_setpvn(PERL_DEBUG_PAD(2), "", 0);
> >     #endif
> > 
> > without -DDEBUGGING when perl.h is compiled DEBUGGING is off so the
> > init code doesn't run.  When ext/re/ compiles re_exec.c (which is
> > really regexec.c) it turns DEBUGGING on, but PL_debug_pad was never
> > initialized.  Boom.
> > 
> > 
> > Solution?  Remove the #ifdef DEBUGGING.
> 
> Looks good to me.  In fact I have a severe case of of dejavu...  ahhh,
yes:
> 
>
____________________________________________________________________________
> [ 13246] By: jhi                                   on 2001/11/24  21:45:32
>         Log: The debug_pag needs to be visible at all times
>              because of the re extension.
>      Branch: perl
>            ! intrpvar.h makedef.pl perl.c perl.h regexec.c
>
____________________________________________________________________________
> 

This all appears to be working fine in multiple versions of 5.8 and
bleadperl.  




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