Project

General

Profile

Actions

Backport #2557

closed

Segmentation fault in Marshal.load in Rails' ActiveSupport in 1.8.7-p248 only

Added by rsutphin (Rhett Sutphin) almost 15 years ago. Updated over 13 years ago.


Description

=begin
There is a consistent segmentation fault in a particular invocation of Marshal.load inside of ActiveSupport. This segfault happens on 1.8.7-p248 and not on 1.8.7-p174. Apologies, but I have not been able to come up with a simpler reproduction. Here's how you can reproduce it from activesupport:

$ git clone git://github.com/rails/rails.git
[...]
$ cd rails/activesupport

Create a file called @fault.rb@ (or whatever you would like) with the following contents:

fault.rb

require File.expand_path("../lib/active_support/multibyte/unicode_database.rb", FILE)
ActiveSupport::Multibyte::UnicodeDatabase.new.codepoints
puts "No crash"

Then execute it:

$ ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin9.8.0]
$ ruby fault.rb
/private/tmp/rails/activesupport/lib/active_support/multibyte/unicode_database.rb:37: [BUG] Segmentation fault
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin9.8.0]

Abort trap

But in 1.8.7-p174:

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0]
$ ruby fault.rb
No crash

This may be related to #2175. Unfortunately, I can't read Japanese so I'm not sure. The backtrace from gdb for this crash does not match the one in #2175, but a colleague pointed out that including @GC.disable@ in @fault.rb@ prevents the crash.
=end


Related issues 1 (0 open1 closed)

Has duplicate Backport187 - Backport #2597: Crash in p248 while installing gemClosedshyouhei (Shyouhei Urabe)01/12/2010Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0