From: "nagachika (Tomoyuki Chikanaga)" Date: 2022-10-15T06:41:07+00:00 Subject: [ruby-core:110306] [Ruby master Bug#19038] Corruption of generic_iv_tbl when compacting Issue #19038 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE ruby_3_1 830fbb412b1c01f0a44b66a70b946d7e87feb6e5 merged revision(s) 76bae60d9b967415c5930c2c5906e14c8362a6dd. ---------------------------------------- Bug #19038: Corruption of generic_iv_tbl when compacting https://bugs.ruby-lang.org/issues/19038#change-99597 * Author: peterzhu2118 (Peter Zhu) * Status: Closed * Priority: Normal * Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/6494 When the generic_iv_tbl is resized up, rebuild_table performs allocations that can trigger GC. If autocompaction is enabled, then moved objects are removed from and inserted into the generic_iv_tbl. This may cause another call to rebuild_table to resize the generic_iv_tbl. When returning back to the original rebuild_table, some of the data may be stale, causing the generic_iv_tbl to be corrupted. Co-Authored-By: @eightbitraptor -- https://bugs.ruby-lang.org/ Unsubscribe: