Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Segfault with MooseX::Declare and Regexp::Grammars

by Anonymous Monk
on Feb 27, 2011 at 13:08 UTC ( [id://890410]=note: print w/replies, xml ) Need Help??


in reply to Segfault with MooseX::Declare and Regexp::Grammars

On win32 I get the same, but this also disappears if I use Data::Dump or Data::Dump::Streamer instead of Data::Dumper

Running under the debugger, I get

Signal SEGV at (reeval 422)[pm.890409.pl:30] line 1
on the 10th iteration.

With Devel::Trace it happens after

>> (eval 334)[C:/perl/site/5.10.1/lib/MSWin32-x86-multi-thread/Class/M +OP/Method/Generated.pm:53]:1: sub {exists $_[0]->{"actual_body"}} >> C:/perl/site/5.10.1/lib/MSWin32-x86-multi-thread/Class/MOP/Method/W +rapped.pm:48: return $around->{cache}->(@_); >> accessor actual_body defined at C:/perl/site/5.10.1/lib/MooseX/Meth +od/Signatures/Meta/Method.pm:101: >> accessor actual_body defined at +C:/perl/site/5.10.1/lib/MooseX/Method/Signatures/Meta/Method.pm:101: +>> C:/perl/site/5.10.1/lib/MooseX/Method/Signatures/Meta/Method.pm:15 +3: goto &{ $actual_body }; >> C:/perl/site/5.10.1/lib/MooseX/Method/Signatures/Meta/Method.pm:153 +: goto &{ $actual_body }; >> pm.890409.pl:34: method BUILD { >> pm.890409.pl:35: use Data::Dumper; print 'AH ', Dump +er \@_; >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:553: r +eturn Data::Dumper->Dump([@_]); >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:190: + return &Dumpxs >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:64: my +($c, $v, $n) = @_; >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:66: cr +oak "Usage: PACKAGE->new(ARRAYREF, [ARRAYREF])" >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:68: $n + = [] unless (defined($n) && (ref($n) eq 'ARRAY')); >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:70: my +($s) = { >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:97: if + ($Indent > 0) { >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:98: +$s->{xpad} = " "; >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:99: +$s->{sep} = "\n"; >> C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/Data/Dumper.pm:101: r +eturn bless($s, $c); >> generated method (unknown origin):30: >> (reeval 421)[pm.890409.pl: +30]:1: >> (reeval 421)[pm.890409.pl:30]:2: >> (reeval 418)[pm.890409. +pl:30]:2: >> C:/perl/site/5.10.1/lib/Regexp/Grammars.pm:556: my ( +$stack_ref, $key, $original_name, $value) = @_;
So I think it could be a bug in Dumpxs, or the perl regexp engine, or both.

Replies are listed 'Best First'.
Re^2: Segfault with MooseX::Declare and Regexp::Grammars
by betterworld (Curate) on Feb 27, 2011 at 14:06 UTC

    This cannot be a bug in Data::Dumper: If I remove the dumping code (so BUILD is empty), the segmentation fault still happens. Sorry I did not mention this. I was so accustomed to Data::Dumper that I did not suspect a bug there :)

      You're not the only one to load Data::Dumper :)
      print "AH Data::Dumper::VERSION $Data::Dumper::VERSION @_\n" +;
      AH Data::Dumper::VERSION 2.128 Foo=HASH(0x1bc0a2c) HASH(0x1bc0afc)
      Data::Dumper may or may not be responsible, directly or otherwise ... someone needs to bust out a debugger and track down where the segfault occurs

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-16 18:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found