Skip to content

Commit 848a7b1

Browse files
committed
Check things in release builds with check-client.
Clang 15 doesn't build the release builds with CHECK_CLIENT enabled because they are using `SNMALLOC_ASSERT` and so the values that we're collecting to check are never actually checked. This is probably a bug - if we're turning on the checks, I imagine it's because we want them.
1 parent 943bae1 commit 848a7b1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/snmalloc/mem/corealloc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ namespace snmalloc
315315
count++;
316316
}
317317
// Check the list contains all the elements
318-
SNMALLOC_ASSERT(
318+
SNMALLOC_CHECK(
319319
(count + more) == snmalloc::sizeclass_to_slab_object_count(sizeclass));
320320

321321
if (more > 0)
@@ -330,7 +330,7 @@ namespace snmalloc
330330
count++;
331331
}
332332
}
333-
SNMALLOC_ASSERT(
333+
SNMALLOC_CHECK(
334334
count == snmalloc::sizeclass_to_slab_object_count(sizeclass));
335335
#endif
336336
// TODO: This is a capability amplification as we are saying we

src/snmalloc/mem/freelist.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ namespace snmalloc
730730
{
731731
if (&head[i] == end[i])
732732
{
733-
SNMALLOC_ASSERT(length[i] == 0);
733+
SNMALLOC_CHECK(length[i] == 0);
734734
continue;
735735
}
736736

@@ -747,7 +747,7 @@ namespace snmalloc
747747
prev = signed_prev(address_cast(curr), address_cast(next), key);
748748
curr = next;
749749
}
750-
SNMALLOC_ASSERT(count == length[i]);
750+
SNMALLOC_CHECK(count == length[i]);
751751
}
752752
#else
753753
UNUSED(key);

0 commit comments

Comments
 (0)