diff options
author | Peter Zhu <[email protected]> | 2022-12-19 11:44:00 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2022-12-19 17:09:08 -0500 |
commit | e7915d6d7042c7945195289d882aa91e35dc9404 (patch) | |
tree | 42d4d37dd16974bcc50b44e3db673990bcb9260a | |
parent | 650a20a3e1205f47224a987676cdbad7d826d597 (diff) |
Fix misfire of compaction read barrier
gc_compact_move incorrectly returns false when destination heap is full
after sweeping. It returns false even if destination heap is different
than source heap (returning false means that the source heap has
finished compacting). This causes the source page to get locked, which
causes a read barrier fire when we try to compact the source heap again.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6963
-rw-r--r-- | gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8519,7 +8519,7 @@ gc_compact_move(rb_objspace_t *objspace, rb_heap_t *heap, rb_size_pool_t *size_p dheap->sweeping_page = ccan_list_next(&dheap->pages, dheap->sweeping_page, page_node); if (gc_compact_heap_cursors_met_p(dheap)) { - return false; + return dheap != heap; } } |