Issue #4339 has been updated by Shyouhei Urabe.

Assignee changed from Nobuyoshi Nakada to Shyouhei Urabe

It's a rather simple story.  Instead of applying the proposed patch Nobu wrote something different (against trunk) for his own and told me to backport that.  But I found Nobu's introduced a test failure.  That's all.

So we had not take a close look at the patch attatched here (I read this one then, but didn't evaluated).  Sorry.  I tested it today and it seems OK.  If you plan to fix this issue use the one attatched here instead of applying Nobu's.  I'll also apply this in the next patchlevel.
----------------------------------------
Backport #4339: Segmentation fault during Marshal.load
http://redmine.ruby-lang.org/issues/4339

Author: Sean Bradly
Status: Assigned
Priority: Normal
Assignee: Shyouhei Urabe
Category: core
Target version: 


=begin
 Conditions that seem to have to be satisfied:
 
 1) A call to Marshal.load must be interrupted by a context switch.
 2) Another thread calls GC.start manually.
 3) The object being marshaled needs to have a lot of child objects to be reliable.
 
 This appears to be a thread-safety issue affecting Ruby 1.8.x only. It triggers reliably for me on:
 
 Ubuntu     -> ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
 Ubuntu-rvm -> ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-linux]
 MacRuby    -> ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
 Mac-rvm    -> ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.0]
=end



-- 
http://redmine.ruby-lang.org