Project

General

Profile

Actions

Bug #16354

closed

Memory corruption in Enumerable#reverse_each

Added by ktsj (Kazuki Tsujimoto) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
[ruby-dev:50867]

Description

Enumerable#reverse_eachのブロック呼び出し中に、対象のEnumerableをto_aしたものを捕まえてサイズを変更するとSEGVすることがあります。

$ ruby -e '(0...1000).reverse_each {|i| i.inspect; ObjectSpace.each_object(Array) {|a| a.clear if a.length == 1000 }}'
-e:1: [BUG] Segmentation fault at 0x0000000000005f19
Actions

Also available in: Atom PDF

Like0
Like0Like0