Bug #2326: 1.8.7 Segmentation fault
http://redmine.ruby-lang.org/issues/show/2326

Author: Johan Holmberg
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.8.7 (2009-09-11 patchlevel 202) [i686-linux]

Ruby 1.8.7 crashes with a "Segmentation fault" on this tiny example:

  % cat foo.rb
  t1 = t2 = Time.now
  while t1.sec == t2.sec
      t2 = Time.now
  end
  %
  % ruby foo.rb
  foo.rb:3: [BUG] Segmentation fault
  ruby 1.8.7 (2009-09-11 patchlevel 202) [i686-linux]

  zsh: abort (core dumped)  /home/johan/src/ruby/installs/ruby_1_8_7/bin/ruby foo.rb

The crash in the example above is with a Ruby built locally by myself using the tip of the "ruby_1_8_7" branch:

  % svn info | egrep "URL|Revision|Date"
  URL: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7
  Revision: 25631
  Last Changed Date: 2009-09-11 05:23:37 +0200 (Fri, 11 Sep 2009)

Originally I discovered the crash with the Ruby in Ubuntu 9.10. But since the problem occurs with the latest revision on the "ruby_1_8_7" branch too, I report it here rather than to Ubuntu. The version in Ubuntu 9.10 is:

 ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]

( I get other Ruby crashes on Unbuntu 9.10 too, it seems like the default Ubuntu setup uses Ruby, and sometimes detects a Ruby crash and reports it via the GNOME-desktop GUI. I have not investigated those crashes yet, so I donا know if the crashes there and the one in my example are related. The Ubuntu-crash is of course an Ubuntu problem, but I mention it here just in case it can be of interest to the Ruby core developers too. )


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