SEGV on Marshal.load

e$B0J2<$N$h$&$K$9$k$He(B SEGV e$B$K$J$j$^$9!#e(B

% ./ruby -ve ’
class C
def initialize(str)
@str = str
end
def _dump(limit)
@str
end
def C._load(s)
C.new(s)
end
end
p Marshal.load("\004\bu:\006C\003\377\377\377a")

ruby 1.9.0 (2007-10-14 patchlevel 0) [i686-linux]
-e:13: – control frame ----------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :load
c:0003 p:0023 s:0006 b:0005 l:000004 d:000004 TOP -e:13
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

DBG> : “-e:13:in `’”
– backtrace of native function call (Use addr2line) –
0x80fa436
0x8118bb4
0x8118c53
0x80c38e5
0xb7fba420
0x80ca6a6
0x807149d
0x8071711
0x8072720
0x8072d48
0x8072d5b
0x805c243
0x8072fe4
0x80f0640
0x80f7f65
0x80f7ae2
0x80f4499
0x80f813e
0x80f8783
0x805abad
0x805ac5c
0x8057e24
0xb7e24ea8
0x8057d41

[BUG] Segmentation fault
ruby 1.9.0 (2007-10-14) [i686-linux]

e$B$$$/$i$+95$($a$K$9$k$H%a%b%j$NCf?H$,GA$1$^$9!#e(B

% ./ruby -ve ’
class C
def initialize(str)
@str = str
end
def _dump(limit)
@str
end
def C._load(s)
C.new(s)
end
end
p Marshal.load("\004\bu:\006C\002\377\377a")

ruby 1.9.0 (2007-10-14 patchlevel 0) [i686-linux]
#<C:0xb7c9e318
@str="a\000\000\037\001\000\000\000\000\000\000\000\000\000\000\244\343\311\267…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs