develooper Front page | perl.perl5.porters | Postings from November 2010

Re: [perl.git] branch blead, updated. v5.13.6-546-g53226d6

From:
Father Chrysostomos
Date:
November 21, 2010 12:20
Subject:
Re: [perl.git] branch blead, updated. v5.13.6-546-g53226d6
Message ID:
3C27A50B-5FBB-42EC-BC81-70F910791C88@cpan.org
On November 18, 2010 01:48, Nicholas Clark wrote:
> > +		struct xpvhv_aux * const newaux = hv_auxinit(hv);
> 
>                        ^^^^^^^^^
> That leaks in some cases. I'm not sure what the correct fix should be. (Sorry)

I’ve looked at it half a dozen times, and I cannot see how it is leaking. The auxiliary structure is allocated as part of the same memory block as HvARRAY. That gets freed either at the end of the loop body or, if the loop exits early, at the end of the function (hfreeentries).

That commit *did* introduce a memory leak. It was leaking a HEK. But that was fixed a few commits later.

There have been more changes since then. Does it leak in current blead?

Does valgrind always tell the truth?




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