[ruby-dev:49043] [Ruby trunk - Bug #11235] [Open] [BUG] Segmentation fault

From: suppy@...
Date: 2015-06-08 06:11:33 UTC
List: ruby-dev #49043
Issue #11235 has been reported by Ikuo Suyama.

----------------------------------------
Bug #11235: [BUG] Segmentation fault
https://bugs.ruby-lang.org/issues/11235

* Author: Ikuo Suyama
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.0.0p598 (2014-11-13) [x64-mingw32]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
コード
n = []
(1..10**9).each do |i|
  n << i
end
puts n.length

実行時のログ
>ruby a.rb
a.rb:3: [BUG] Segmentation fault
ruby 2.0.0p598 (2014-11-13) [x64-mingw32]

-- Control frame information -----------------------------------------------
c:0004 p:0010 s:0011 e:000010 BLOCK  a.rb:3 [FINISH]
c:0003 p:---- s:0008 e:000007 CFUNC  :each
c:0002 p:0021 s:0005 E:0005c0 EVAL   a.rb:2 [FINISH]
c:0001 p:0000 s:0002 E:000728 TOP    [FINISH]

a.rb:2:in `<main>'
a.rb:2:in `each'
a.rb:3:in `block in <main>'

-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0xa) [0x00007FFDA878120A]
C:\WINDOWS\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x98) [0x00007FFDA5A21118]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_vm_bugreport+0x9d) [0x000000006F287B1D]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_name_err_mesg_new+0x838) [0x000000006F142828]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_bug+0x45) [0x000000006F1435D5]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_check_safe_str+0x3e1) [0x000000006F20C051]
 [0x0000000000401A85]
C:\WINDOWS\SYSTEM32\ntdll.dll(_C_specific_handler+0x96) [0x00007FFDA8772896]
C:\WINDOWS\SYSTEM32\ntdll.dll(_chkstk+0x9d) [0x00007FFDA8783F0D]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlRaiseException+0xf67) [0x00007FFDA8744887]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x3a) [0x00007FFDA878309A]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_ary_push+0x4c) [0x000000006F10C8CC]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_vm_localjump_error+0x3170) [0x000000006F278240]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_vm_localjump_error+0x5cb9) [0x000000006F27AD89]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_yield+0x178) [0x000000006F284628]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_reset_random_seed+0x1b80) [0x000000006F1D2220]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_error_arity+0x125) [0x000000006F2726A5]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_f_send+0x5a1) [0x000000006F2814D1]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_vm_localjump_error+0x1c91) [0x000000006F276D61]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_vm_localjump_error+0x5cb9) [0x000000006F27AD89]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_iseq_eval_main+0x1e0) [0x000000006F284C90]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(rb_check_copyable+0x3287) [0x000000006F148597]
D:\Ruby200-x64\bin\x64-msvcrt-ruby200.dll(ruby_run_node+0x51) [0x000000006F14AE11]
 [0x0000000000402D14]
 [0x00000000004013D7]
 [0x00000000004014F8]
C:\WINDOWS\system32\KERNEL32.DLL(BaseThreadInitThunk+0x22) [0x00007FFDA7CD13D2]

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

* Loaded script: a.rb

* Loaded features:

    0 enumerator.so
    1 D:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/encdb.so
    2 D:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/windows_31j.so
    3 D:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/trans/transdb.so
    4 D:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/rbconfig.rb
    5 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/compatibility.rb
    6 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/defaults.rb
    7 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/deprecate.rb
    8 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/errors.rb
    9 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/version.rb
   10 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/requirement.rb
   11 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/platform.rb
   12 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/specification.rb
   13 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/exceptions.rb
   14 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/defaults/operating_system.rb
   15 D:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/utf_16le.so
   16 D:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/trans/utf_16_32.so
   17 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
   18 D:/Ruby200-x64/lib/ruby/2.0.0/thread.rb
   19 D:/Ruby200-x64/lib/ruby/2.0.0/monitor.rb
   20 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb
   21 D:/Ruby200-x64/lib/ruby/2.0.0/rubygems.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


配列の要素数の上限を超えたため発生していると思いますが、
[BUG]という表示は適切ではないと思います。



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

In This Thread

Prev Next