develooper Front page | perl.perl5.porters | Postings from January 2014

Re: leak in const_av_xsub?

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
January 5, 2014 14:15
Subject:
Re: leak in const_av_xsub?
Message ID:
20140105141532.26122.qmail@lists-nntp.develooper.com
Daniel Dragan wrote:
> In const_av_xsub at
> http://perl5.git.perl.org/perl.git/blob/db9cb8483f3d2ac7f4fe573c8623e33721ea6139:op.c#l12347
> I see "    ST(0) = newSViv((IV)AvFILLp(av)+1);". No sv_2mortal near by,
> and we aren't using TARG. I'm not sure this if this is leaking. Its some
> pretty new code by Father Chrysostomos
> http://perl5.git.perl.org/perl.git/commit/6f1b3ab07ea077b8191fe508269d778bc64a5f50
> added in 5.19.3.

Thank you for finding that.  That is indeed a leak.

./miniperl -Ilib -le 'warn $$; use constant foo => 1..3; while(1){ scalar &foo }'

> I'm in the process of optimizing const_av_xsub ATM.

I will wait before fixing it, then.  Unless you want to
include it in your refactoring.


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