Since I now know that the original crash had another cause as the one desribed above, now I did the following:

Now I have some similar crash to the original one with Perl 5.10.0 / Ubuntu 9.10 (then: crash in Perl_pad_swipe, now: crash in Perl_pad_free). The cause seems very complicated to me as it is a combination of serveral modules and code.

I removed as much code as possible while making the script still crash.
This is what remains, where the core dump / segfault disappears if I remove ANY of the parts marked by XXX.

#!/usr/bin/perl -w use strict; use warnings; use POSIX; # XXX -- module use MooseX::Declare; use namespace::autoclean; # XXX -- module class Ida::Config with MooseX::Log::Log4perl is mutable { use strict; use warnings; use Moose::Util::TypeConstraints; # XXX -- some attribute has dummyAttribute => ( isa => 'Str', is => 'rw', default => sub { [] }, ); # XXX -- an unknown type method isAllowedIp(UnknownType $ip!) { return; } } 1;

Result:

tux@sm00123:~/Projects/infotool$ ./test2.pl 'UnknownType' could not be parsed to a type constraint - maybe you nee +d to pre-declare the type with class_type at /home/tux/CPAN/lib/perl5 +/MooseX/Declare/Syntax/MethodDeclaration.pm line 40 Segmentation fault (Speicherabzug geschrieben)

The error code is ok, but why a segfault?

Debugger gives me:

tux@sm00123:~/Projects/infotool$ gdb /usr/bin/perl ./core GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gp +l.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copy +ing" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/perl...(no debugging symbols found)...do +ne. [New Thread 24238] warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging sym +bols found)...done. Loaded symbols for /lib/tls/i686/cmov/libdl.so.2 Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symb +ols found)...done. Loaded symbols for /lib/tls/i686/cmov/libm.so.6 Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debuggin +g symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0 Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging symb +ols found)...done. Loaded symbols for /lib/tls/i686/cmov/libc.so.6 Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...(no debugging +symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found) +...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/lib/perl/5.10/auto/Fcntl/Fcntl.so...(no debu +gging symbols found)...done. Loaded symbols for /usr/lib/perl/5.10/auto/Fcntl/Fcntl.so Reading symbols from /usr/lib/perl/5.10/auto/POSIX/POSIX.so...(no debu +gging symbols found)...done. Loaded symbols for /usr/lib/perl/5.10/auto/POSIX/POSIX.so Reading symbols from /usr/lib/perl/5.10/auto/List/Util/Util.so...(no d +ebugging symbols found)...done. Loaded symbols for /usr/lib/perl/5.10/auto/List/Util/Util.so Reading symbols from /usr/lib/perl/5.10/auto/mro/mro.so...(no debuggin +g symbols found)...done. Loaded symbols for /usr/lib/perl/5.10/auto/mro/mro.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Params/Util/Util.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Params/Util/Util.so Reading symbols from /usr/lib/perl5/auto/Sub/Name/Name.so...(no debugg +ing symbols found)...done. Loaded symbols for /usr/lib/perl5/auto/Sub/Name/Name.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Devel/GlobalDestruction/GlobalDestruction.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Devel/GlobalDestruction/GlobalDestruction.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Class/MOP/MOP.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Class/MOP/MOP.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/List/MoreUtils/MoreUtils.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/List/MoreUtils/MoreUtils.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Moose/Moose.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Moose/Moose.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Variable/Magic/Magic.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Variable/Magic/Magic.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Sub/Identify/Identify.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Sub/Identify/Identify.so Reading symbols from /usr/lib/perl/5.10/auto/Digest/MD5/MD5.so...(no d +ebugging symbols found)...done. Loaded symbols for /usr/lib/perl/5.10/auto/Digest/MD5/MD5.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Clone/Clone.so...(no debugging symbols found)...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Clone/Clone.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/B/Hooks/OP/Check/Check.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/B/Hooks/OP/Check/Check.so Reading symbols from /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mu +lti/auto/Devel/Declare/Declare.so...done. Loaded symbols for /home/tux/CPAN/lib/perl5/i486-linux-gnu-thread-mult +i/auto/Devel/Declare/Declare.so Core was generated by `perl -I/home/tux/CPAN/lib/perl5 -I/home/tux/Pro +jects/infotool/lib -c -w'. Program terminated with signal 11, Segmentation fault. #0 0x080a26a5 in Perl_pad_free ()

In reply to Perl crash by maxhq
in thread Segfault in Sub::Name by maxhq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.