develooper Front page | perl.perl5.porters | Postings from March 2008

Re: [PATCH] do not use SVTYPEMASK to prevent cleaning of PL_fdpid and PL_strtab

Thread Previous
From:
Nicholas Clark
Date:
March 28, 2008 17:32
Subject:
Re: [PATCH] do not use SVTYPEMASK to prevent cleaning of PL_fdpid and PL_strtab
Message ID:
20080329003242.GB79799@plum.flirble.org
On Wed, Mar 26, 2008 at 02:07:13PM +0100, Gerard Goossen wrote:
> The patch disables cleaning of PL_fdpid and PL_strtab by excluding them
> from do_clean_all instead of abusing the SvTYPE. Setting the SVTYPEMASK
> was giving problems with kurila with some of the recent checks that SVs
> passed to av_* function are actually SVt_PVAV (I am not sure why this
> only happens in kurila and not in blead). 

$ PERL_DESTRUCT_LEVEL=2 ./perl -e 'open FH, "sleep 5|"'
Assertion failed: (SvTYPE(av) == SVt_PVAV), function Perl_av_fetch, file av.c, line 215.
Abort trap

but I only worked that one out because it turns out that it's the cause of
two test failures for make minitest.

> Also it uses the return value of sv_clean_all() instead of PL_sv_count.
> In some cases (in particular the t/op/threads.t) it appears that
> PL_sv_count is incorrect and the previous method would result in an
> infinite loop.
> 
> Is there a valid reason why PL_sv_count can be different than the number
> of SVs as returned by S_visit? If not we could add some asserts that
> they are equal and pinpoint the memory leaks of t/op/threads.t

I don't know. It certainly does not sound correct.

Patch applied as change 33595.

Nicholas Clark

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About