wingo pushed a commit to branch wip-whippet
in repository guile.

commit b6e9d3c0bb547011f036e69fce524d5dd19a1531
Author: Andy Wingo <wi...@igalia.com>
AuthorDate: Wed Aug 21 10:16:00 2024 +0200

    Fix bug in which empty block would not have mark bits cleared
---
 src/whippet.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/whippet.c b/src/whippet.c
index 1f3edda2b..2f77b251e 100644
--- a/src/whippet.c
+++ b/src/whippet.c
@@ -2153,6 +2153,8 @@ static size_t next_hole(struct gc_mutator *mut) {
       if (granules < GRANULES_PER_BLOCK)
         return granules;
       struct block_summary *summary = block_summary_for_addr(mut->block);
+      // Sweep mark bytes for completely empty block.
+      memset(metadata_byte_for_addr(mut->block), 0, GRANULES_PER_BLOCK);
       block_summary_clear_flag(summary, BLOCK_NEEDS_SWEEP);
       // Sweeping found a completely empty block.  If we are below the
       // minimum evacuation reserve, take the block.

Reply via email to