From 18df01733362ec0d86c60722348a352179e50221 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 28 May 2026 07:43:06 -0400 Subject: [PATCH] xo-gc: utest: assert nits for release build (2) --- xo-gc/src/gc/GCObjectStore.cpp | 6 ++++-- xo-gc/src/gc/MutationLogStore.cpp | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/xo-gc/src/gc/GCObjectStore.cpp b/xo-gc/src/gc/GCObjectStore.cpp index b6f0b6e8..65849820 100644 --- a/xo-gc/src/gc/GCObjectStore.cpp +++ b/xo-gc/src/gc/GCObjectStore.cpp @@ -393,7 +393,8 @@ namespace xo { if (recd) { bool ok = final_stats_v->push_back(mm, recd); - assert(ok); + if (!ok) + assert(false); } } @@ -427,7 +428,8 @@ namespace xo { uint32_t age = info.age(); - assert(age < hard_n_age); + if (age >= hard_n_age) + assert(false); soft_max_age = std::max(soft_max_age, age); } diff --git a/xo-gc/src/gc/MutationLogStore.cpp b/xo-gc/src/gc/MutationLogStore.cpp index 7c1a8d78..63b8aaa6 100644 --- a/xo-gc/src/gc/MutationLogStore.cpp +++ b/xo-gc/src/gc/MutationLogStore.cpp @@ -444,9 +444,12 @@ namespace xo { log && log("parent not in to-space -> must be in from-space"); +# ifndef NDEBUG Generation parent_gen_from = gc.generation_of(Role::from_space(), from_entry.parent()); - assert(!parent_gen_from.is_sentinel()); + if (!parent_gen_from.is_sentinel()) + assert(false); +# endif if (from_entry.is_superseded()) { log && log("entry superseded -> discard");