Project

General

Profile

Bug #16354

Memory corruption in Enumerable#reverse_each

Added by ktsj (Kazuki Tsujimoto) 26 days ago. Updated about 11 hours ago.

Status:
Closed
Priority:
Normal
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

Associated revisions

Revision ff416634
Added by ktsj (Kazuki Tsujimoto) 26 days ago

Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867] [Bug #16354]

Revision fd3c731a
Added by nagachika (Tomoyuki Chikanaga) about 11 hours ago

merge revision(s) ff41663403d3eb76d95f465cb94e14d2faaa04d1: [Backport #16354]

    Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867]
     [Bug #16354]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 67835
Added by nagachika (Tomoyuki Chikanaga) about 11 hours ago

merge revision(s) ff41663403d3eb76d95f465cb94e14d2faaa04d1: [Backport #16354]

Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867]
 [Bug #16354]

History

#1

Updated by ktsj (Kazuki Tsujimoto) 26 days ago

  • Status changed from Open to Closed

Applied in changeset git|ff41663403d3eb76d95f465cb94e14d2faaa04d1.


Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867] [Bug #16354]

Updated by nagachika (Tomoyuki Chikanaga) about 11 hours ago

  • Backport changed from 2.5: REQUIRED, 2.6: REQUIRED to 2.5: REQUIRED, 2.6: DONE

ruby_2_6 r67835 merged revision(s) ff41663403d3eb76d95f465cb94e14d2faaa04d1.

Also available in: Atom PDF