develooper Front page | perl.perl5.porters | Postings from April 2000

Secondary Memory corruption during destruction?

Thread Next
From:
Nick Ing-Simmons
Date:
April 20, 2000 09:39
Subject:
Secondary Memory corruption during destruction?
Message ID:
200004201639.RAA22724@tiuk.ti.com

Still on the trail of warnings during exit from certain Tk apps
I turned on PERL_DESTRUCT_LEVEL 3.

Now some of them core-dump instead ;-)

Code that causes that is (perl5.005_03) sv.c line 2891:

    if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv))
	mg_free(sv);

Now the sv in question has SvTYPE(sv) == SVTYPEMASK - which is 
certainly bigger than SVt_PVMG but does not mean that SvANY points
to something which will lead to a sane chain of magics to free!

The root of the problem is probably still elsewhere, 
but should sv_clear() just return if SvTYPE(sv) == SVTYPEMASK ?


-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.


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