Forum: Ruby-core [Assigned] SEGFAULT caused by `p`

C042517d59bed4761cc88681bf71fca8?d=identicon&s=25 Glass_saga (Masaki Matsushita) (Guest)
on 2013-08-09 17:19
(Received via mailing list)
Issue #8756 has been updated by Glass_saga (Masaki Matsushita).

Category set to core
Status changed from Open to Assigned
Assignee set to Glass_saga (Masaki Matsushita)

Bug #8756: SEGFAULT caused by `p`

Author: misfo (Trent Ogren)
Status: Assigned
Priority: Normal
Assignee: Glass_saga (Masaki Matsushita)
Category: core
Target version:
ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674)
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Printing the instance methods for a Struct with a member name ending in
a question mark causes a seg fault. I've confirmed this using the
2.0.0p247 on OS X and linux.

Here's the minimal test case for reproducing from a shell:

$ ruby -e 'p'
-e:1: [BUG] Segmentation fault
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]

-- Crash Report log information
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   the more detail of.

-- Control frame information
c:0005 p:---- s:0012 e:000011 CFUNC  :inspect
c:0004 p:---- s:0010 e:000009 CFUNC  :inspect
c:0003 p:---- s:0008 e:000007 CFUNC  :p
c:0002 p:0018 s:0004 E:0014b8 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0002 E:000768 TOP    [FINISH]

-e:1:in `<main>'
-e:1:in `p'
-e:1:in `inspect'
-e:1:in `inspect'

-- C level backtrace information

-- Other runtime information

* Loaded script: -e

* Loaded features:

    5 ~/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/defaults.rb
    6 ~/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/deprecate.rb
    7 ~/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/errors.rb
    8 ~/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/version.rb
   10 ~/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/platform.rb
   12 ~/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/exceptions.rb
   15 ~/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems.rb

You may have encountered a bug in the Ruby interpreter or extension
Bug reports are welcome.
For details:

Abort trap: 6
This topic is locked and can not be replied to.