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

Re: [perl #40389] perl_destruct() leaks PL_defstash

Thread Previous | Thread Next
From:
Andy Dougherty
Date:
September 25, 2006 09:41
Subject:
Re: [perl #40389] perl_destruct() leaks PL_defstash
Message ID:
Pine.LNX.4.62.0609251231300.13395@fractal.phys.lafayette.edu
On Thu, 21 Sep 2006, gozer @ activestate . com wrote:

> # New Ticket Created by  gozer@activestate.com 
> # Please include the string:  [perl #40389]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40389 >
> 

> In perl_destruct():
> 
> 1061:    /* Prepare to destruct main symbol table.  */
> 1062:
> 1063:    hv = PL_defstash;
> 1064:    PL_defstash = 0;
> 1065:    SvREFCNT_dec(hv); /* At this point, SvREFCNT(hv) is 2 */
> 1066:    SvREFCNT_dec(PL_curstname);
> 
> It would seem it's caused by a self-reference somewhere, since adding
> hv_clear(hv) before the call to SvREFCNT_dec() brings the refcnt down
> to 1.
> 
> $> perl -e1
> perl_destruct leaking a PL_defstash with refcnt=2
> 
> is enough to demonstrate this bug

I can't reproduce this with today's perl 5.9.x, patchlevel 28890.  Are you 
still seeing it?  If so, let me know and I'll do a detailed comparison of 
configurations to see if we can figure out what's going on.

-- 
    Andy Dougherty		doughera@lafayette.edu


Thread Previous | Thread Next


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