Issue #13605 has been updated by robertgleeson (Robert Gleeson).


Another case:

Ruby v2.4.1 (ruby), Pry v0.10.4, method_source v0.8.2, CodeRay v1.1.1, Pry::Slop v3.4.0
/home/travis/build/pry/pry/spec/pry_output_spec.rb:119: warning: assigned but unused variable - custom_io
......................................................................................................................................................................................................................................./home/travis/build/pry/pry/lib/pry/pry_instance.rb:159: [BUG] rb_gc_mark(): 0x00000003556f88 is T_NONE
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

See: https://travis-ci.org/pry/pry/jobs/239070622
I don't think segv is directly related to Pry::InputCompleter, just luck that it sometimes happens there, sometimes from lib/pry/slop,
and sometimes in pry_instance.rb, something seems wrong in the runtime.

----------------------------------------
Bug #13605: GC bug calling `ObjectSpace.each_object`
https://bugs.ruby-lang.org/issues/13605#change-65270

* Author: ryanf (Ryan Fitzgerald)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
This code made Ruby bail out with the message "[BUG] rb_gc_mark(): 0x000000040dc740 is T_NONE":

~~~ ruby
ObjectSpace.each_object(Module){|m|
  next if (to_ignore.include?(m) rescue true)

  if m.respond_to?(:instance_methods)
    candidates.concat m.instance_methods(false).collect(&:to_s)
  end
}
~~~

I haven't been able to repro, but it happened building Pry on Travis CI: https://travis-ci.org/pry/pry/jobs/236720971

The relevant logs are attached.

---Files--------------------------------
each_object_bug.txt (81.9 KB)
patch-for-2508d68e.patch (8.07 KB)
Dockerfile (353 Bytes)


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

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>