From ba880a03da65adf2231a397f94ed9c29a0f1c73c Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 7 Jul 2025 16:37:50 +0200 Subject: [PATCH] Add an assert to nofl's marking procedure --- src/nofl-space.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nofl-space.h b/src/nofl-space.h index cda7e5f92..14e3b1a16 100644 --- a/src/nofl-space.h +++ b/src/nofl-space.h @@ -1630,6 +1630,8 @@ nofl_space_set_nonempty_mark(struct nofl_space *space, uint8_t *metadata, uint8_t byte, struct gc_ref ref) { // FIXME: Check that relaxed atomics are actually worth it. if (nofl_space_set_mark(space, metadata, byte)) { + GC_ASSERT(nofl_metadata_byte_is_young_or_has_mark(byte, + space->survivor_mark)); nofl_block_set_mark(gc_ref_value(ref)); return 1; }