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

>  $ ./perl -Ilib -d:DProf -e 'require "t/"; 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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About