{ my $i = 60000; my %h = (new => {}); my $r = \%h; for (0..$i) { print $_, " "; $r = $r->{new}; $r->{new} = {}; } print "end 1\n"; } # <-- hash goes out of scope; segfault if stacksize is too low print "end 2\n";