Ruby 1.9.0 crash on Kubuntu Hardy Heron

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
 
B

Brian Candler

Bug said:
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]

Your program works fine for me on 1.9.1-preview2, under Ubuntu Hardy.

$ ruby19 crash.rb
$ ruby19 -v
ruby 1.9.1 (2008-12-01 revision 20438) [i686-linux]
$

So maybe you just need to upgrade.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top