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

newSVsv leaks ([perl #107000] Hint-hash copying can leak)

Thread Next
From:
Father Chrysostomos via RT
Date:
September 23, 2012 06:55
Subject:
newSVsv leaks ([perl #107000] Hint-hash copying can leak)
Message ID:
rt-3.6.HEAD-11172-1348408505-1686.107000-15-0@perl.org
On Sun Jan 08 08:03:21 2012, davem wrote:
> On Wed, Jan 04, 2012 at 11:14:30PM -0800, Father Chrysostomos via RT
wrote:
> > This patch only reduces the number to 3, so we have other things
> > leaking.  Do failed evals leak in general?  Is that unfixable?  If
> > that’s the case, it’s probably not worthwhile plugging something so rare
> > as this.
> 
> failed evals are known to leak OPs during compilation (and this is hard to
> fix). They are not supposed to leak SVs, unless possibly those are SVs are
> attached to OPs.

I had a go at it again, but I am running into problems with newSVsv. 
Specifically, newSVsv(sv) on an sv that dies on FETCH is always going to
leak the new SV.

There are probably many uses of newSVsv that suffer from this.

Is the solution to add newSVsv_flags that takes the SVs_TEMP flag?

-- 

Father Chrysostomos

"${;s/.*/Just an";
other Perl hacker,
/s} die or return;
print


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=107000

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