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

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

Thread Next
Father Chrysostomos via RT
September 23, 2012 06:55
newSVsv leaks ([perl #107000] Hint-hash copying can leak)
Message ID:
On Sun Jan 08 08:03:21 2012, davem wrote:
> On Wed, Jan 04, 2012 at 11:14:30PM -0800, Father Chrysostomos via RT
> > 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;

via perlbug:  queue: perl5 status: open

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