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

Re: [patch] ignore PL_curpm in PL_regex_padav cleanup

Thread Previous
From:
Jarkko Hietaniemi
Date:
August 3, 2001 17:55
Subject:
Re: [patch] ignore PL_curpm in PL_regex_padav cleanup
Message ID:
20010803195456.S17752@chaos.wustl.edu
On Fri, Aug 03, 2001 at 05:37:53PM -0700, Doug MacEachern wrote:
> this part of the regex plug patch was indeed bogus:
>             if (re && (re->refcnt > 0)) {
>                 ReREFCNT_dec(re);
>             }
> 
> it was a bandaid since some refcnts were dropping below 0, in which case
> Perl_pregfree would try to free them again.  turns out that case is
> PL_curpm, which is just a pointer, the real thing gets freed elsewhere.
> patch fixes by marking the PL_regex_padav entry for PL_curpm with the
> SVf_BREAK flag.  the flag is only used until arena cleanup, which happens
> after PL_regex_padav has already been cleared.

Thanks, applied.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

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