B
Bug Free
Hi,
Ruby 1.9.0 crashes on the following code:
======================
class Foo
def Foo.get
return true if defined? @@x && @@x <= 0
end
end
Foo.get
======================
This is the version:
clay:~/tests/ruby/bugs$ ruby1.9 -v
ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]
This is the stack trace:
clay:~/tests/ruby/bugs$ ruby1.9 crash.rb
crash.rb:7: [BUG] Stack consistency error (sp: 10, bp: 9)
ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]
-- control frame ----------
c:0004 p:0025 s:0010 b:0009 l:000008 d:000008 METHOD crash.rb:7
c:0003 p:0020 s:0006 b:0006 l:000005 d:000005 TOP crash.rb:10
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP <dummy toplevel>:17
---------------------------
DBG> : "crash.rb:10:in `<main>'"
-- backtrace of native function call (Use addr2line) --
0xb7f4560c
0xb7e6d3a6
0xb7e6d402
0xb7f3ed80
0xb7f42d09
0xb7f43382
0xb7e7361b
0xb7e736e3
0x8048752
0xb7c81450
0x8048681
Ruby 1.9.0 crashes on the following code:
======================
class Foo
def Foo.get
return true if defined? @@x && @@x <= 0
end
end
Foo.get
======================
This is the version:
clay:~/tests/ruby/bugs$ ruby1.9 -v
ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]
This is the stack trace:
clay:~/tests/ruby/bugs$ ruby1.9 crash.rb
crash.rb:7: [BUG] Stack consistency error (sp: 10, bp: 9)
ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]
-- control frame ----------
c:0004 p:0025 s:0010 b:0009 l:000008 d:000008 METHOD crash.rb:7
c:0003 p:0020 s:0006 b:0006 l:000005 d:000005 TOP crash.rb:10
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP <dummy toplevel>:17
---------------------------
DBG> : "crash.rb:10:in `<main>'"
-- backtrace of native function call (Use addr2line) --
0xb7f4560c
0xb7e6d3a6
0xb7e6d402
0xb7f3ed80
0xb7f42d09
0xb7f43382
0xb7e7361b
0xb7e736e3
0x8048752
0xb7c81450
0x8048681