Bug #3557: Marshal.dump fails for large Arrays of Arrays
http://redmine.ruby-lang.org/issues/show/3557

Author: Andrew Jankevics
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.2dev (2010-05-31) [x64-mswin64_80]

def test
    n1 = 10
    n2 = 34000
    b = Array.new n1    
    for i in 0 ... n1 do
        a = Array.new n2        
        for j in 0 ... n2 do a[j] = j end
        b[i] = a
    end

    Marshal.dump b
end

dump_arg_data in marshal.c gets prematurely freed by GC run_final()
Enclosing the Marshal.dump with GC.disable and GC.enable fixes the problem


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