Forum: Ruby-core Segmentation fault in Hash#[]

Posted by fahmisetiawan (Fahmi Setiawan) (Guest)
on 2012-10-01 12:48
(Received via mailing list)
Issue #1000 has been updated by fahmisetiawan (Fahmi Setiawan).


http://alkian.blogspot.com/2012/09/keretamini-kere...
----------------------------------------
Bug #1000: Segmentation fault in Hash#[]
https://bugs.ruby-lang.org/issues/1000#change-29822

Author: mog (Morgan Christiansson)
Status: Closed
Priority: Normal
Assignee:
Category:
Target version:
ruby -v:


=begin
 Ruby crashes when creating a Hash using the [] public method.
 For some reason it works the first time but segfaults the second time.

 $ irb
 irb(main):001:0> Hash[*{:k=>["empty"]}]
 => {"empty"=>false}
 irb(main):002:0> Hash[*{:k=>["empty"]}]
 /usr/lib/ruby/1.8/irb.rb:302: [BUG] Segmentation fault
 ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

 Aborted
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.