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

Re: my purify runs with 5.6.1-to-be

Thread Previous | Thread Next
From:
Radu Greab
Date:
March 16, 2001 13:02
Subject:
Re: my purify runs with 5.6.1-to-be
Message ID:
15026.32600.320197.844954@ix.netsoft.ro
On Fri, 16 Mar 2001 13:50 -0600, Jarkko Hietaniemi wrote:
 > > and op/mkdir.  I managed to whittle down a 'minimal' core dumping
 > > example
 > > 
 > > 	PERL_DESTRUCT_LEVEL=1 ./perl -Ilib -MCwd -e 1
 > > 
 > > I still haven't had the time to cut this down, sorry...
 > 
 > Now did.  Well, kind of.  The following will still tickle forth an
 > identical coredump in Tru64 (compiled with -DDEBUGGING -g)
 > 
 > 	package Q;
 > 	use Carp;
 > 	use base 'Exporter';
 > 	1;
 > 
 > as Q.pm with
 > 
 >  	PERL_DESTRUCT_LEVEL=1 ./perl -Ilib -MQ -e 1
 > 
 > Both Carp and base 'Exporter' are needed.  The PERL_DESTRUCT_LEVEL
 > needs to be set to nonzero.  If the name of the file and the package
 > name do no match, there's no core dump.
 > 
 > The reduction was only kind of succesful since Carp and base
 > are still left.

I don't see that on the Alpha I'm testing on with perl-5.6.1-T2. With
perl-5.6.1-T2 and Sarathy's patch I get exactly five reproducible
coredumps:
op/taint.............FAILED at test 80
lib/db-recno.........FAILED at test 0
lib/findbin..........FAILED at test 0
lib/ipc_sysv.........FAILED at test 0
lib/parsewords.......FAILED at test 0

What I found is that in clear_pmop PmopSTASH(cPMOPo) is corrupt, I
guess because it was already cleared. HvPMROOT(pmstash) returns
garbage and we get the coredump.

Changing this line in Sarathy's patch from

 clear_pmop:
+	{
+	    HV *pmstash = PmopSTASH(cPMOPo);
+	    if (pmstash) {

to

+	    if (pmstash && SvREFCNT(pmstash)) {

stops the coredumps but I'm not sure if SvREFCNT(pmstash) is to be trusted
if pmstash was already cleared.


Thanks,
Radu Greab

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