In article <Pine.LNX.4.64.0607221126100.30944 / localhost.localdomain>,
  Mathieu Bouchard <matju / artengine.ca> writes:

> All versions of Ruby, up to some early 1.9, may perform an incomplete 
> mark, due to assuming that the system call-stack is empty at the moment 
> ruby_init is called. Then the sweep deletes objects still in use, which by 
> chain reaction corrupts memory, leads to segfaults, bus errors, unknown 
> node types, failed assertions, and various other forms of suicide.

It seems about calling RUBY_INIT_STACK in main.c

> IIRC, the solution implemented in ruby 1.9 involves a fair amount of 
> ifdefs and platform-specific code because there's no standard way to get 
> stack-end information via system headers or system functions. Over the 
> years, my program has included various ways to detect the stack-end and 
> tell Ruby about it, but recent versions of ruby do it much better (all my 
> tricks have failed mysteriously. i suspect changes in glibc and gcc to be 
> related, but that's beyond my level.)

But RUBY_INIT_STACK doesn't contain ifdefs except for ia64.

So I'm not certain what code should be backported.
-- 
Tanaka Akira