From: Edwin Fine Date: 2006-12-02T19:03:36+09:00 Subject: Re: Segmentation fault, proc, eval, long string I get a segfault too on Ubuntu Edgy x86_64. efine@ender:/tmp$ uname -a Linux ender 2.6.17-10-generic #2 SMP Fri Oct 13 15:34:39 UTC 2006 x86_64 GNU/Linux efine@ender:/tmp$ ruby segfault.rb the_string length: 186749 Segmentation fault (core dumped) I don't want to insult anyone's intelligence by stating what could be to many the obvious, but I'd like to make an observation. An iterative version of the algorithm might or might not solve the problem; it all depends how much data has to be stacked on each iteration (e.g. closures), and where/how it is stacked. If malloc() is used to create a stack for use with the iterative code, the system will practically have to run out of VM before the process dies, but using malloc instead of hardware stack allocation may create performance problems unless special care is taken, which could be a lot of work. Is it worth the effort to cater for this special case, given the ulimit -s workaround? Incidentally, on my system, the default stack size is only 8MB. That's not a lot these days (given memory capacities these days). Just a thought. -- Posted via http://www.ruby-forum.com/.