Actions
Bug #11235
closed[BUG] Segmentation fault
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p598 (2014-11-13) [x64-mingw32]
Description
コード
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]
配列の要素数の上限を超えたため発生していると思いますが、
[BUG]という表示は適切ではないと思います。
Files
Updated by nobu (Nobuyoshi Nakada) about 9 years ago
- File bug-11235.log bug-11235.log added
- Description updated (diff)
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
Updated by nobu (Nobuyoshi Nakada) about 9 years ago
- Status changed from Open to Closed
Applied in changeset r50827.
array.c: fix array size overflow
- array.c (ary_ensure_room_for_push): check if array size will
exceed maxmum size to get rid of buffer overflow.
[ruby-dev:49043] [Bug #11235] - array.c (ary_ensure_room_for_unshift, rb_ary_splice): ditto.
Updated by nagachika (Tomoyuki Chikanaga) almost 9 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE
Backported into ruby_2_2
branch at r51473.
Updated by usa (Usaku NAKAMURA) almost 9 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE
ruby_2_1 r51597 merged revision(s) 50827,50921.
Actions
Like0
Like0Like0Like0Like0