develooper Front page | perl.perl5.porters | Postings from May 2002

Re: [ID 20020513.015] Seg-fault running t/io/fs.t under Devel::DProf

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
May 13, 2002 17:48
Subject:
Re: [ID 20020513.015] Seg-fault running t/io/fs.t under Devel::DProf
Message ID:
20020514034835.X8867@alpha.hut.fi
On Mon, May 13, 2002 at 08:35:35PM -0400, Sam Tregar wrote:
> On Tue, 14 May 2002, Jarkko Hietaniemi wrote:
> 
> > p cv
> 
> (gdb) p cv
> $1 = (CV *) 0x0

Well, dereferencing that (as CvGV() would do) leads nowhere.  Or, as
the Ten Commandments for C Programmers quoth, "Thou shalt not follow
the NULL pointer, for chaos and madness await thee at its end."

> > p *cv
> 
> (gdb) p *cv
> Cannot access memory at address 0x0
> 
> > call Perl_sv_dump(cv)
> 
> (gdb) call Perl_sv_dump(cv)
> SV = 0
> 
> 
> And, if you're wondering where cv, came from - it resulted from a
> INT2PTR(CV*,SvIVX(Sub)).  Sub is:

If I knew ::DProf enough to what is supposed to be in the SvIVX
I would knowingly nod my head here.

> (gdb) call Perl_sv_dump(Sub)
> SV = PVIV(0x8166c90) at 0x81666b8
>   REFCNT = 1
>   FLAGS = (IOK,POK,pIOK,pPOK)
>   IV = 0
>   PV = 0x817a3c8 "135747636"\0
>   CUR = 9
>   LEN = 10
> 
> I think the PV value is an artifact of my having turned on DBG_SUB in
> DProf.xs.  I think it's also 0 with DBG_SUB off.  I'd be happy to run the
> test again with DBG_SUB off if that would help you.

Yes, please.

> -sam

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

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