From f7d2fc176e09b850909d6608ac60e9b9a6f1bcbc Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 10 Oct 2025 21:15:44 -0400 Subject: [PATCH] kernel/slab: Add some more info to a paranoid ASSERT in object_cache_alloc. This was triggered in #19782. Ultimately more information will be needed to diagnose what overwrote the memory, and this is a start. --- src/system/kernel/slab/Slab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/slab/Slab.cpp b/src/system/kernel/slab/Slab.cpp index 162c77dc93..2847aa18c5 100644 --- a/src/system/kernel/slab/Slab.cpp +++ b/src/system/kernel/slab/Slab.cpp @@ -1294,7 +1294,8 @@ object_cache_alloc(object_cache* cache, uint32 flags) #if PARANOID_KERNEL_FREE if (cache->object_size >= (sizeof(void*) * 2)) { - ASSERT_ALWAYS(*(uint32*)object == 0xdeadbeef); + ASSERT_ALWAYS_PRINT(*(uint32*)object == 0xdeadbeef, + "object %p", object); } #endif