Bug #10062
closedSegfault involving Queue
Description
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.
- Clone https://github.com/flajann2/rubyneat/tree/devready (yes, the devready branch)
- In its root do "rake install" to install the gem
- Clone https://github.com/flajann2/rubyneat_dashboard/tree/master
- In its root do "rake install" to install that gem
- Clone https://github.com/flajann2/rubyneat_examples/tree/devready (yes, the devready branch)
- Go to the root of that and
- Run "bundle update"
- Run "neat run xor"
- It should segfault almost immediately.
Files
Updated by LordAlveric (Fred Mitchell) almost 10 years ago
The condition has been tagged as 'segfault' on all three projects. Since I will attempt to find a workaround, be sure to pull those tags, as well as 'devready' branches on rubyneat and rubyneat_examples
Updated by nagachika (Tomoyuki Chikanaga) almost 10 years ago
Hello fred, thank you for your reporting.
At first, could you try to reproduce it with 2.1-head and trunk?
Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago
- Status changed from Open to Feedback
- Priority changed from 7 to Normal
Does anyone can reproduce this?
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
- File bug-10062.txt bug-10062.txt added
- Description updated (diff)
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]
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
- Tracker changed from Backport to Bug
- Project changed from Backport21 to Ruby master
- ruby -v set to trun
- Backport set to 2.0.0: REQUIRED, 2.1: REQUIRED
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
- Status changed from Feedback to Closed
- % Done changed from 0 to 100
Applied in changeset r47217.
thread.c: check initialized
- ext/thread/thread.c (get_array): check instance variables are
initialized properly. [ruby-core:63826][Bug #10062]
Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE
Backported into ruby_2_1
branch at r47378.
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONTNEED, 2.1: DONE