in reply to Tie hash Segmentation fault

You would be more likely to get help if you ran it inside gdb (e.g. "gdb --args perl my-script.pl"), grabbed a backtrace with the "where" command, and posted that.

Replies are listed 'Best First'.
Re^2: Tie hash Segmentation fault
by gam3 (Curate) on Jan 08, 2010 at 12:32 UTC
    Yes you are quite correct. That would be helpful.

    The bug seems to be in Storable.

    Program received signal SIGSEGV, Segmentation fault. 0x00007ffff662f194 in do_store (my_perl=0x602010, f=0x0, sv=0x74dad0, +optype=0, network_order=1, res=0x7fffffffe440) at Storable.xs:3739 3739 dSTCXT; #0 0x00... in do_store (my_perl=0x602010, f=0x0, sv=0x74dad0, optype= +0, network_order=1, res=0x7fffffffe440) at Storable.xs:3739 #1 0x00... in net_mstore (my_perl=0x602010, cv=<value optimized out>) + at Storable.xs:3914 #2 XS_Storable_net_mstore (my_perl=0x602010, cv=<value optimized out> +) at Storable.xs:6444 #3 0x00... in Perl_pp_entersub () from /usr/lib/libperl.so.5.10 #4 0x00... in Perl_runops_standard () from /usr/lib/libperl.so.5.10 #5 0x00... in Perl_call_sv () from /usr/lib/libperl.so.5.10 #6 0x00... in Perl_sv_clear () from /usr/lib/libperl.so.5.10 #7 0x00... in Perl_sv_free2 () from /usr/lib/libperl.so.5.10 #8 0x00... in ?? () from /usr/lib/libperl.so.5.10 #9 0x00... in Perl_sv_clean_objs () from /usr/lib/libperl.so.5.10 #10 0x00... in perl_destruct () from /usr/lib/libperl.so.5.10 #11 0x00... in main ()
    UPDATE:
    • Updated GDB output to version with symbol table.
    -- gam3
    A picture is worth a thousand words, but takes 200K.
      Here is where Perl debugging gets ugly. "dSTCTX" expands into something or other, often through multiple layers of macros, and GDB doesn't do so well at debugging macros. Your goal is to fully expand "dSTCTX" and figure out which part of it is seg-faulting.