Project

General

Profile

Actions

Bug #10976

closed

SEGV: `p ()...0`

Added by Skade (Florian Gilcher) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]
[ruby-core:<unknown>]

Description

The following program crashes ruby-2.2.1-p85:

p ()..0

Note that the following works:

()..0 # => bad value for range (ArgumentError)
p(()..0) # => bad value for range (ArgumentError)

Crash report:

test.rb: [BUG] Segmentation fault at 0x00000000000000
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]

-- 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
   for more details.

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:000990 TOP    [FINISH]


-- Machine register context ------------------------------------------------
 rax: 0x00007ff22403a1b0 rbx: 0x00007ff223cce820 rcx: 0x0000000000007f00
 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000800000
 rbp: 0x00007fff5d7b9730 rsp: 0x00007fff5d7b8db0  r8: 0x0000000000000000
  r9: 0x00007fff5d7b8a00 r10: 0x00007ff223cce820 r11: 0x0000000000000246
 r12: 0x0000000000000b77 r13: 0x00007fff7cfc97d8 r14: 0x00007fff5d7b8f60
 r15: 0x00000000000000cf rip: 0x00000001024fec56 rfl: 0x0000000000010202

-- C level backtrace information -------------------------------------------
0   ruby                                0x00000001025dfe5b rb_vm_bugreport + 155
1   ruby                                0x0000000102484490 rb_bug_context + 480
2   ruby                                0x000000010255c823 sigsegv + 83
3   libsystem_platform.dylib            0x00007fff905a05aa _sigtramp + 26
4   ruby                                0x00000001024fec56 ruby_yyparse + 39078
5   ???                                 0xff80000000001000 0x0 + 18410715276690591744

-- Other runtime information -----------------------------------------------

* Loaded script: test.rb

* Loaded features:

    0 enumerator.so
    1 rational.so
    2 complex.so
    3 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/x86_64-darwin13/enc/encdb.bundle
    4 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/x86_64-darwin13/enc/trans/transdb.bundle
    5 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/unicode_normalize.rb
    6 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/x86_64-darwin13/rbconfig.rb
    7 thread.rb
    8 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/x86_64-darwin13/thread.bundle
    9 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/compatibility.rb
   10 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/defaults.rb
   11 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/deprecate.rb
   12 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/errors.rb
   13 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/version.rb
   14 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/requirement.rb
   15 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/platform.rb
   16 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/basic_specification.rb
   17 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/stub_specification.rb
   18 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/util/stringio.rb
   19 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/specification.rb
   20 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/exceptions.rb
   21 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb
   22 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb
   23 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb
   24 /Users/skade/.rubies/ruby-2.2.1/lib/ruby/2.2.0/rubygems.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap: 6

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #10957: seg fault in ruby_yyparse () at parse.y:2105 (null ptr / stack overflow)Closed03/10/2015Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0