Re: The evil Perl reads freed things

[email protected] (Nicholas Clark) Tue, 22 Jun 2004 14:09:01 +0100
Newsgroups perl.ponie.dev
Message-ID <[email protected]>
On Fri, Jun 18, 2004 at 08:36:59PM +0100, Nicholas Clark wrote:

> Other tests fail in strange ways, and valgrind reports errors which are
> reads in the heads of now-free scalars.
> 
> So, I'm not sure what to do, as this assumption that you can read any
> head even after it's undead seems to be quite deeply ingrained. And it
> needs to be solved before we can usefully replace heads with PMCs.

It seems that I can work round this problem by deferring free()ing the SV
heads until the next time temporaries are freed. So they're now put into
a linked list, and freed by free_tmps().

Ponie in CVS now has SV* being a pointer to a PMC. (and all tests pass)

Nicholas Clark