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

Re: [patch] ignore PL_curpm in PL_regex_padav cleanup

Thread Previous
Jarkko Hietaniemi
August 3, 2001 17:55
Re: [patch] ignore PL_curpm in PL_regex_padav cleanup
Message ID:
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++; #
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About