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

Re: leak in const_av_xsub?

Thread Previous | Thread Next
From:
bulk88
Date:
January 6, 2014 02:07
Subject:
Re: leak in const_av_xsub?
Message ID:
BLU0-SMTP130B3E8D9BB3E7F86DA75BEDFB70@phx.gbl
Father Chrysostomos wrote:
> 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.
> 

Also ../cpan/NEXT/t/stringify.t went down the G_ARRAY branch.

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