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

Re: TPF bug-grant report #18

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
July 12, 2010 02:43
Subject:
Re: TPF bug-grant report #18
Message ID:
20100712094324.GF3025@iabyn.com
On Mon, Jul 12, 2010 at 10:20:28AM +0100, Nicholas Clark wrote:
> On Mon, Jul 12, 2010 at 10:17:00AM +0100, Dave Mitchell wrote:
> > Continued to work on the CvSTASH/GvSTASH/CvGV/EGP weak backrefs and
> > general dangling pointers mess. Should hopefully start seeing some pushed
> 
> Do you have somewhere convenient a (roughly accurate) list of RT tickets
> for these?

No :-(

I started from a basis of wanting to sort out the randomly passing stash.t
TODO test, and from there progressed to code inspection of
CvSTASH/GvSTASH/CvGV/EGP to work out how they worked, and to put in
general backref mechanisms to ensure they are accurate and never dangling
under any circumstances. I was vaguely planning to look for tickets
afterwards to ensure that I haven't missed anything.

> I remember figuring out that EGPs are an un-reference-counted
> pointer, and that GVs/CVs have a loop that isn't reference counted, but I'm
> not sure if these are the only ones, or what user-visible bugs it's actually
> caused.

All 4 of CvSTASH/GvSTASH/CvGV/EGP are weak references, some of which were
protected under some circumstances, but CvSTASH and CvGV could be left
dangling.

I've also been trying to make things more efficient, e.g. arrange things
in such a way where possible that the backreferences magic array is
processed first in a single loop and them freed, rather than freeing the
things it refers to first and thus calling sv_del_backref() N times.

-- 
Justice is when you get what you deserve.
Law is when you get what you pay for.

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