Forum: Ruby-core Segfault involving Queue

F1d6cc2b735bfd82c8773172da2aeab9?d=identicon&s=25 Nobuyoshi Nakada (nobu)
on 2014-08-19 02:51
(Received via mailing list)
Issue #10062 has been updated by Nobuyoshi Nakada.

File bug-10062.txt added
Description updated

Seems the `Queue` instance is not initialized properly.
Probably, `Queue#initialize` is overridden somewhere?

~~~
$ ruby -rthread -e 'class Thread::Queue; def
initialize;end;end;q=Thread::Queue.new;q.push(nil)'
-e:1: [BUG] Segmentation fault at 0x00000000000008
ruby 2.2.0dev (2014-08-18 trunk 47214) [universal.x86_64-darwin13]
~~~


----------------------------------------
Backport #10062: Segfault involving Queue
https://bugs.ruby-lang.org/issues/10062#change-48400

* Author: Fred Mitchell
* Status: Feedback
* Priority: Normal
* Assignee:
----------------------------------------
Pushing an object onto a `Queue` instantiation causes a segfault. This
was seen on Ruby versions 2.1.1 and 2.1.2

In the interests of being able to completely reproduce the environment
in which this happens, I have included detailed instructions here.

1. Clone https://github.com/flajann2/rubyneat/tree/devready (yes, the
devready branch)
2. In its root do "rake install" to install the gem
3. Clone https://github.com/flajann2/rubyneat_dashboard/tree/master
4. In its root do "rake install" to install that gem
5. Clone https://github.com/flajann2/rubyneat_examples/tree/devready
(yes, the devready branch)
6. Go to the root of that and
7. Run "bundle update"
8. Run "neat run xor"
9. It should segfault almost immediately.


---Files--------------------------------
bug-10062.txt (189 KB)
This topic is locked and can not be replied to.