SEGV by marshal_dump and callcc

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

% ./ruby -rcontinuation -ve ’
o = Object.new
def o.marshal_dump() callcc {|k| $k = k }; “fofof” end
a = [1,2,3,o,4,5,6]
p Marshal.dump(a)
$k.call

ruby 1.9.0 (2008-05-22 revision 16527) [i686-linux]
“\x04\b[\fi\x06i\ai\bU:\vObjectI”\nfofof\x06:\rencoding"\rUS-ASCIIi\ti\ni\v"
-e:5: [BUG] Segmentation fault
ruby 1.9.0 (2008-05-22 revision 16527) [i686-linux]

– stack frame ------------
0000 (0xb7abd008): 00000004
0001 (0xb7abd00c): 081aeb38
0002 (0xb7abd010): 00000004
0003 (0xb7abd014): 00000001
0004 (0xb7abd018): 081aec00
0005 (0xb7abd01c): 081aeb9c
0006 (0xb7abd020): 00000004
0007 (0xb7abd024): 081aeb4c
0008 (0xb7abd028): 00000004
0009 (0xb7abd02c): 081ccd40
0010 (0xb7abd030): 081aeb9c
0011 (0xb7abd034): 00000004
0012 (0xb7abd038): 00000001 <- lfp <- dfp
– control frame ----------
c:0004 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC :dump
c:0003 p:0055 s:0009 b:0008 l:0023dc d:0023dc TOP -e:5
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
:private_class_method
c:0001 p:0000 s:0002 b:0002 l:00241c d:00241c TOP :17

DBG> : “-e:5:in `’”
– backtrace of native function call (Use addr2line) –
0x8117ec4
0x813ca1b
0x813ca53
0x80dacd3
0xb7f58440
0x8079fd3
0x807a0ec
0x807a2e6
0x807a918
0x807b061
0x807b3b4
0x805d34d
0x807b69b
0x810d8d7
0x81156ea
0x8115234
0x8111733
0x81158d1
0x8115f22
0x805bc06
0x805bca9
0x8058d28
0xb7db9ea8
0x8058c31

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