以下のようにすると SEGV します。

1.9 で Marshal.dump:

  class C
    def marshal_dump
      $block.call(:marshal_dump)
    end

    def dump_each(&block)
      $block = block
      Marshal.dump(self)
    end
  end

  o = C.new
  e = o.enum_for(:dump_each)
  p e.next
  GC.start

1.9 で Marshal.load:

  class C
    def marshal_dump
      nil
    end

    def marshal_load(obj)
      $block.call(:marshal_load)
    end

    def C.load_each(m, &block)
      $block = block
      Marshal.load(m)
    end
  end

  o = C.new
  m = Marshal.dump(o)
  e = C.enum_for(:load_each, m)
  p e.next
  GC.start

1.8 で Marshal.dump:

  class C
    def marshal_dump
      loop { Thread.pass }
    end
  end

  o = C.new
  Thread.new { Marshal.dump(o) }
  GC.start

1.8 で Marshal.load:

  class C
    def marshal_dump
      nil
    end

    def marshal_load(obj)
      loop { Thread.pass }
    end
  end

  o = C.new
  m = Marshal.dump(o)
  Thread.new { Marshal.load(m) }
  GC.start

------------------------------------------------------------------------------
% ./ruby -ve '
class C
  def marshal_dump
    $block.call(:marshal_dump)
  end

  def dump_each(&block)
    $block = block
    Marshal.dump(self)
  end
end

o = C.new
e = o.enum_for(:dump_each)
p e.next
GC.start
'
ruby 1.9.2dev (2009-10-03 trunk 25205) [i686-linux]
:marshal_dump
-e:16: [BUG] Segmentation fault
ruby 1.9.2dev (2009-10-03 trunk 25205) [i686-linux]

-- control frame ----------
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC  :start
c:0003 p:0078 s:0008 b:0008 l:0026b4 d:001e9c EVAL   -e:16
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0026b4 d:0026b4 TOP   
---------------------------
-e:16:in `<main>'
-e:16:in `start'

-- C level backtrace information -------------------------------------------
./ruby(rb_vm_bugreport+0x6c) [0x815079e]
./ruby [0x8182e0d]
./ruby(rb_bug+0x36) [0x8182e68]
./ruby [0x80eadea]
[0xb7f6c410]
./ruby [0x8064412]
./ruby(st_foreach+0x1d8) [0x80f36ae]
./ruby [0x806444c]
./ruby(rb_mark_set+0x28) [0x8064476]
./ruby [0x807fea5]
./ruby [0x8064d0d]
./ruby [0x80647f3]
./ruby [0x806420f]
./ruby [0x8064357]
./ruby(rb_gc_mark_locations+0x27) [0x8064380]
./ruby [0x8156be5]
./ruby [0x8156cec]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby(rb_gc_mark+0x28) [0x806481d]
./ruby [0x8180b6d]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby [0x806420f]
./ruby [0x8064357]
./ruby(rb_gc_mark_locations+0x27) [0x8064380]
./ruby [0x814c04c]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby(rb_gc_mark+0x28) [0x806481d]
./ruby [0x805fd2e]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x1d8) [0x80f36ae]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby(rb_gc_mark+0x28) [0x806481d]
./ruby [0x8065d9e]
./ruby(rb_gc+0x1f) [0x8066b99]
./ruby(rb_gc_start+0xb) [0x8065f65]
./ruby [0x8146386]
./ruby [0x814621f]
./ruby [0x814575e]
./ruby [0x8141432]
./ruby [0x814dd99]
./ruby(rb_iseq_eval_main+0x2b) [0x814e40c]
./ruby(ruby_exec_node+0x9a) [0x805e35b]
./ruby(ruby_run_node+0x64) [0x805e3fc]
./ruby(main+0x74) [0x805cf48]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7d8c455]
./ruby [0x805ce41]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

------------------------------------------------------------------------------
% ./ruby -ve '
class C
  def marshal_dump
    nil
  end

  def marshal_load(obj)
    $block.call(:marshal_load)
  end

  def C.load_each(m, &block)
    $block = block
    Marshal.load(m)
  end
end

o = C.new
m = Marshal.dump(o)
e = C.enum_for(:load_each, m)
p e.next
GC.start
'
ruby 1.9.2dev (2009-10-03 trunk 25205) [i686-linux]
:marshal_load
-e:21: [BUG] Segmentation fault
ruby 1.9.2dev (2009-10-03 trunk 25205) [i686-linux]

-- control frame ----------
c:0004 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC  :start
c:0003 p:0106 s:0009 b:0009 l:001b24 d:0014c8 EVAL   -e:21
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001b24 d:001b24 TOP   
---------------------------
-e:21:in `<main>'
-e:21:in `start'

-- C level backtrace information -------------------------------------------
./ruby(rb_vm_bugreport+0x6c) [0x815079e]
./ruby [0x8182e0d]
./ruby(rb_bug+0x36) [0x8182e68]
./ruby [0x80eadea]
[0xb7fc4410]
./ruby [0x80643e6]
./ruby(rb_mark_tbl+0x28) [0x80646ab]
./ruby [0x8082367]
./ruby [0x8064d0d]
./ruby [0x80647f3]
./ruby [0x806420f]
./ruby [0x8064357]
./ruby(rb_gc_mark_locations+0x27) [0x8064380]
./ruby [0x8156be5]
./ruby [0x8156cec]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby(rb_gc_mark+0x28) [0x806481d]
./ruby [0x8180b6d]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby [0x806420f]
./ruby [0x8064357]
./ruby(rb_gc_mark_locations+0x27) [0x8064380]
./ruby [0x814c04c]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby(rb_gc_mark+0x28) [0x806481d]
./ruby [0x805fd2e]
./ruby [0x8064ce9]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x1d8) [0x80f36ae]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x80643ac]
./ruby(st_foreach+0x6b) [0x80f3541]
./ruby [0x80643e6]
./ruby [0x8064b26]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby [0x8064ac8]
./ruby [0x80647f3]
./ruby(rb_gc_mark+0x28) [0x806481d]
./ruby [0x8065d9e]
./ruby(rb_gc+0x1f) [0x8066b99]
./ruby(rb_gc_start+0xb) [0x8065f65]
./ruby [0x8146386]
./ruby [0x814621f]
./ruby [0x814575e]
./ruby [0x8141432]
./ruby [0x814dd99]
./ruby(rb_iseq_eval_main+0x2b) [0x814e40c]
./ruby(ruby_exec_node+0x9a) [0x805e35b]
./ruby(ruby_run_node+0x64) [0x805e3fc]
./ruby(main+0x74) [0x805cf48]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7de4455]
./ruby [0x805ce41]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

------------------------------------------------------------------------------
% ./ruby -ve '
class C
  def marshal_dump
    loop { Thread.pass }
  end
end
o = C.new
Thread.new { Marshal.dump(o) }
GC.start
'
ruby 1.8.8dev (2009-10-02 revision 25186) [i686-linux]
zsh: segmentation fault  ./ruby -ve 

% ./ruby -ve '
class C
  def marshal_dump
    nil
  end

  def marshal_load(obj)
    loop { Thread.pass }
  end
end

o = C.new
m = Marshal.dump(o)
Thread.new { Marshal.load(m) }
GC.start
'
ruby 1.8.8dev (2009-10-02 revision 25186) [i686-linux]
zsh: segmentation fault  ./ruby -ve 
-- 
[田中 哲][たなか あきら][Tanaka Akira]