From: ts Date: 2004-10-19T23:14:12+09:00 Subject: Re: [BUG] segfault in ruby-1.8.2p2 >>>>> "t" == ts writes: t> b.rb:3: [BUG] Segmentation fault t> ruby 1.8.2 (2004-10-18) [i686-linux] Do someone has a C compiler which don't define __libc_stack_end ? This is the difference between 1.8 and 1.9 Actually my conclusion is that you can't predict the order of the arguments on the stack. For example with 1.8.2-preview2 Breakpoint 2, ruby_exec () at eval.c:1456 1456 eval_node(ruby_top_self, ruby_eval_tree); (gdb) p &tmp $1 = (volatile struct RNode **) 0xbffff8ec (gdb) p prot_tag $2 = (struct tag *) 0xbffff8f0 (gdb) p prot_tag+1 $3 = (struct tag *) 0xbffff9ac (gdb) p rb_gc_stack_start $4 = (VALUE *) 0xbffff900 (gdb) and ruby make the assumption that tmp is in the first position Init_stack((void*)&tmp); a simple fix like int ruby_exec() { volatile NODE *tmp; Init_stack((void*)&tmp); return ruby_exec0(); } seems to correct the problem Guy Decoux