Issue #6618 has been updated by cantregister (Why Cantiregister).


sorry about the strange username, i tried to register 3 times before this one worked.
----------------------------------------
Bug #6618: Seg Fault when printing thread.keys
https://bugs.ruby-lang.org/issues/6618#change-27324

Author: cantregister (Why Cantiregister)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]


This is very easy to reproduce:

require 'bigdecimal'

for thr in Thread.list
 puts thr.keys
end

Somehow a key is introduced to the thread with the object ID of 8.

Attempting to inspect or to_s this key results in a seg fault.

1.9.3p194 :001 > ObjectSpace._id2ref(8)
RangeError: 0x00000000000008 is not symbol id value

It is not clear how this object is created or inserted into the Thread. 


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