Created
January 13, 2011 13:40
-
-
Save berekuk/777860 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I've found this problem initially by using Coro with XML::LibXML; | |
# XML::LibXML::Error object on large invalid documents can contain lots of nested objects | |
sub more_nesting { | |
return bless { x => shift } => "A" | |
} | |
sub build_deep { | |
my $depth = shift; | |
my $x; | |
$x = more_nesting($x) for 1..shift(); | |
undef $x; # segfault happens at this point | |
} | |
# number varies on various systems and perl versions; | |
# perl5.8 breaks somewhere between 20k and 30k, perl5.10 even before 20k | |
build_deep(30_000); | |
use Coro; | |
async(sub { | |
build_deep(300) # critical number for my perl/system is 291 | |
})->join; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment