develooper Front page | perl.perl5.porters | Postings from August 2011

[perl #98092] "Attempt to free unreferenced scalar" from dist/threads-shared/t/clone.t

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
August 31, 2011 21:34
Subject:
[perl #98092] "Attempt to free unreferenced scalar" from dist/threads-shared/t/clone.t
Message ID:
rt-3.6.HEAD-31297-1314851664-1701.98092-15-0@perl.org
On Wed Aug 31 20:41:39 2011, sprout wrote:
> The other warnings are also the result of padlists in @DB::args.  If
> they get cloned through @DB::args, their refcounts are not incremented
> (except for that held by param->unreferenced), hence the double free.
> 
> Is there any reason padlists can’t be marked AvREAL (so sv_dup_common
> knows to use sv_dup_*inc* on the elems)? In cv_undef, we could turn off
> the REAL flag just before:
> 
> 	SvREFCNT_dec(MUTABLE_SV(CvPADLIST(cv)));
> 	CvPADLIST(cv) = NULL;

See the smoke-me/avreal-padlist branch.  All tests pass for me.  Is
anyone reading my monologue?


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