Issue #9151 has been updated by nobu (Nobuyoshi Nakada).


It's a simple machine stack overflow.
What's your platform?
----------------------------------------
Bug #9151: Segfault in Ruby head
https://bugs.ruby-lang.org/issues/9151#change-43155

Author: sam.saffron (Sam Saffron)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby-head
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


Following code causes a segfault in ruby head on x64:


class A
  attr_accessor :b

  def hash
    [b,""].hash
  end
end

class B
  attr_accessor :a

  def hash
    [a,""].hash
  end
end

a = A.new
b = B.new
a.b = b
b.a = a

p a.hash
p b.hash

p [a,"hello"].hash == [b,"world"].hash







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