diff options
| author | nagachika <nagachika@ruby-lang.org> | 2022-10-15 15:40:47 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2022-10-15 15:40:47 +0900 |
| commit | 830fbb412b1c01f0a44b66a70b946d7e87feb6e5 (patch) | |
| tree | 485268f73ab26859a18efb504f3c20dfd8f02027 /lib/net/https.rb | |
| parent | 994b505ffb0bf9eb795525199b47697412a98abb (diff) | |
merge revision(s) 76bae60d9b967415c5930c2c5906e14c8362a6dd: [Backport #19038]
[Bug #19038] Fix corruption of generic_iv_tbl when compacting
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.
This commit changes rebuild_table to only read data from the st_table
after the allocations have completed.
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
---
st.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Diffstat (limited to 'lib/net/https.rb')
0 files changed, 0 insertions, 0 deletions
