Project

General

Profile

Actions

Backport #4339

closed

Segmentation fault during Marshal.load

Added by rhythmx (Sean Bradly) about 13 years ago. Updated about 12 years ago.


Description

=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


Files

REPRO4.rb (906 Bytes) REPRO4.rb Reproduces the segfault rhythmx (Sean Bradly), 01/29/2011 09:09 AM
ruby-1.8.7-trac22417.patch (3.49 KB) ruby-1.8.7-trac22417.patch Patch file rhythmx (Sean Bradly), 02/01/2011 08:56 AM
ruby-1.8.7-marshal.patch (6.09 KB) ruby-1.8.7-marshal.patch backport of marshall patch from upstream vo.x (Vit Ondruch), 11/15/2011 11:16 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0