Bug #13865
closedTriggered segfault, on Ruby2.4/OSX.
Description
Hi.
I ran into a segmentation fault, the reproduction steps are here:
$ git clone https://github.com/r-obert/pry-plusplus.git
$ cd pry-plusplus
$ git checkout edf3496f425ef2512431a79b72a2a5fd930b2fcf
$ gem install bundler --no-rdoc --no-ri
$ bundle install
$ rake pry # or: ruby -Ilib bin/pry
pry(main)> _pry_.h.deprecate_method! Object.methods.map{|m| Object.method(m) }, "everything is deprecated"
zsh: segmentation fault rake pry
Sorry, I have not reduced further. Could this be an exception instead, so I can see what is wrong? Thanks.
Updated by 0xab (0xAB .) about 7 years ago
JRuby provides a little more useful information:
[1] pry(main)> _pry_.h.deprecate_method! Object.methods.map{|m| Object.method(m) }, "everything is deprecated"
DEPRECATED: everything is deprecated
.. Called from ../code/rb/pry-plusplus/lib/pry/deprecate.rb:34:in `define_method'
Run '_pry_.config.print_deprecations = false' to stop printing this message.
DEPRECATED: everything is deprecated
.. Called from ../code/rb/pry-plusplus/lib/pry/deprecate.rb:34:in `define_method'
Run '_pry_.config.print_deprecations = false' to stop printing this message.
DEPRECATED: everything is deprecated
.. Called from ../code/rb/pry-plusplus/lib/pry/deprecate.rb:34:in `define_method'
Run '_pry_.config.print_deprecations = false' to stop printing this message.
Error: Your application used more stack memory than the safety cap of 2048K.
Specify -J-Xss####k to increase it (#### = cap size in KB).
Specify -w for full java.lang.StackOverflowError stack trace
Updated by 0xab (0xAB .) about 7 years ago
Hi.
This is fixed on 2.5.0:
2] pry(main)> _pry_.h.deprecate_method! Object.methods.map{|m| Object.method(m) }, "everything is deprecated"
Traceback (most recent call last):
5405: from bin/pry:12:in `<main>'
5404: from ../code/rb/pry-plusplus/lib/pry/cli.rb:116:in `start'
5403: from ..code/rb/pry-plusplus/lib/pry/pry_class.rb:192:in `start'
..
... 5393 levels...
$ ruby -v
ruby 2.5.0dev (2017-09-05 trunk 59751) [x86_64-darwin15]
But my instructions do not work on 2.5.0, since bundle install
does not work:
$ bundle install
../ruby-head/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize': deadlock; recursive locking (ThreadError)
So, $ gem install coderay method_source --no-rdoc --no-ri
would have to be used first.
Are there plans for a release before December?
2.4 seems a little buggy. I've hit a different segfault too, that has since been fixed on trunk.
Please mark this as closed, as I seem unable to. Thanks.
Updated by wyhaines (Kirk Haines) about 7 years ago
- Status changed from Open to Closed
Per your request, I have closed this.