On Wed, Jun 29, 2005 at 09:46:33PM -0000, kynn jones wrote: > With an argument greater than some system-dependent critical size, the > script causes perl to segfault: > > use strict; > use warnings; > > my $size = shift; > > my $x = []; > $x = [ $x ] for 1..$size; > > require Storable; > Storable::store( \$x, '/tmp/$0.$$' ) or die;
It's the stack being trashed due to excessive recursion. No real way to fix it short of rewriting Storable to be iterative rather than recursive. The workaround is to increase the stack size available to the process with 'uname -s' -- In defeat, indomitable; in victory, insufferable -- Churchill on Montgomery