Subject: | Segfault bug in rnew->packages from Test::Class+Moose+Test::WWW::Mechanize::Catalyst |
It seems their is something going on in Devel::Symdump::_symdump under
rnew() (recursive) that is causing a segfault.
The stack trace shows Test::Class uses Devel::Symdump to discover
packages that are "tests". The usage is trivial and I suspect
Devel::Symdump shouldn't segfault no matter what packages have been
loaded :)
Below (and attached) is the code I'm using - the versions of relivant
package - my system id (ubuntu) and the strack trace output from the
perldebugger.
Sorry, I couldn't give you more but I'm not very handy with gdb+perl.
-- cut --
package Mech;
use Moose;
use Scalar::Util 'blessed';
use Test::XML::RPC::Catalyst;
use Test::WWW::Mechanize::JSON;
extends qw[Test::WWW::Mechanize::Catalyst];
1;
package Case;
BEGIN {
use Moose;
use Mech;
extends qw[Test::Class Moose::Object];
}
has 'mech' => (
is => 'ro',
isa => 'Mech',
lazy_build => 1,
);
has uri => (
is => 'ro',
isa => 'Str',
builder => 'build_uri',
lazy => 1,
required => 1
);
sub _build_mech {
return Mech->new();
};
1;
package ATest;
BEGIN {
use self;
use Moose;
extends 'Case';
}
sub build_uri { '/test/abc/'; }
sub t1_foo : Tests {
self->builder->ok(1);
self->builder->ok(1);
self->builder->ok(1);
self->builder->ok(1);
}
1;
# $Moose::VERSION == 0.68
# $Test::XML::RPC::Catalyst::VERSION == 0.01
# $Scalar::Util::VERSION == 1.19
# $Test::WWW::Mechanize::JSON::VERSION == 0.2
# $Test::WWW::Mechanize::Catalyst::VERSION == 0.50
# $Test::Class::VERSION == 0.31
# $Devel::Symdump::VERSION == 2.08
/tmp$ perl -MATest -d -e 'ATest->runtests();'
Loading DB routines from perl5db.pl version 1.3
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
Attribute::Handlers::CODE(0x9938358)(/usr/share/perl/5.10/Attribute/Handlers.pm:221):
221: $global_phase++;
DB<1> c
Signal SEGV at /usr/local/share/perl/5.10.0/Devel/Symdump.pm line 114
Devel::Symdump::_symdump('Devel::Symdump=HASH(0x99d2478)', 'version',
'namespace', 'Case', 'Tie', 'Devel', 'U64', 'Encode', 'Regexp', ...)
called at /usr/local/share/perl/5.10.0/Devel/Symdump.pm line 114
Devel::Symdump::_symdump('Devel::Symdump=HASH(0x99d2478)', 'main')
called at /usr/local/share/perl/5.10.0/Devel/Symdump.pm line 43
Devel::Symdump::_doit('Devel::Symdump=HASH(0x99d2478)') called at
/usr/local/share/perl/5.10.0/Devel/Symdump.pm line 30
Devel::Symdump::rnew('Devel::Symdump') called at
/usr/local/share/perl/5.10.0/Test/Class.pm line 309
Test::Class::_test_classes('ATest') called at
/usr/local/share/perl/5.10.0/Test/Class.pm line 318
Test::Class::runtests('ATest') called at -e line 1
Aborted
/tmp$ cat /proc/version
Linux version 2.6.27-12-generic (buildd@palmer) (gcc version 4.3.2
(Ubuntu 4.3.2-1ubuntu12) ) #1 SMP Thu Feb 5 09:26:35 UTC 2009
Subject: | debug.out |
Message body not shown because it is not plain text.