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:
Sam Tregar
Date:
May 14, 2002 15:04
Subject:
Re: [ID 20020513.015] Seg-fault running t/io/fs.t under Devel::DProf
Message ID:
Pine.LNX.4.44.0205141746160.20718-100000@localhost.localdomain
On Tue, 14 May 2002, Sam Tregar wrote:

>  $ ./perl -Ilib -d:DProf -e 'require "t/test.pl"; SKIP: {skip("test")}'
>  ok 1 # skip: test
>  Segmentation fault (core dumped)

Here's a way to trigger it without an external file:

 $ ./perl -w -Ilib -d:DProf -e 'sub skip { last SKIP; } SKIP: { skip; }'
 Exiting subroutine via last at -e line 1.
 Segmentation fault (core dumped)

Interestingly, that warning doesn't happen even after adding "-w" in the
quoted example.

Investigating pp_ctl.c leads me to think that pp_last() is to blame.
Unline pp_goto(), pp_last() doesn't have any code that looks at the
PERLDB* settings.  It appears to be capable of exiting subroutines without
properly restoring the Devel::DProf state.  I think this is likely to be
the reason for the seg fault later down the road.

So, the task then is to figure out how to write code in pp_last() that
will do the same good work as pp_goto().  If this proves to be the
solution then it probably needs to be applied to pp_next() too.

-sam




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