Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: segmentation fault

by jbert (Priest)
on Aug 27, 2008 at 13:04 UTC ( #707148=note: print w/replies, xml ) Need Help??

in reply to segmentation fault

The suggestion elsewhere to use Devel::Trace is a good one.

Otherwise, you need to isolate what is causing the segmentation fault.

You might get some useful information by running perl under gdb and getting a backtrace:

box> gdb perl gdb> r ...your program runs and then stops with a segmentation fault ...dropping you back to gdb... gdb> bt

the displayed backtrace is perl's call stack, it might give some information as to where perl is dying.

You might also have success by trying to find the minimum amount of code needed to cause the segfault. Try commenting out about 1/2 of the module loads (you can use =pod and =cut to comment out a block of code) and do a binary search. Even with a thousand modules, that would only take approx 10 steps.

Replies are listed 'Best First'.
Re^2: segmentation fault
by betterworld (Curate) on Aug 27, 2008 at 13:51 UTC
    box> gdb perl gdb> r

    I think "" shoud be after "r", not after "gdb perl".

      Thanks, you're right.

      I blame too much time spent in the perl debugger recently.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://707148]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2021-04-23 07:56 GMT
Find Nodes?
    Voting Booth?

    No recent polls found