From 6d9810fe7f9deaf9cd83f053d029924379124a32 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 3 Aug 2026 17:38:21 -0400 Subject: [PATCH] Poison Node48 reverseIndex slot on erase When a Node48 loses a child, the vacated reverseIndex slot would otherwise remain defined, letting valgrind miss reads that rely on the stale value. Mark it undefined, mirroring the existing poisoning of the vacated children slot. --- ConflictSet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index a82d0d1..5572dd3 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2025,6 +2025,8 @@ Node *erase(Node *self, WriteContext *writeContext, bool logical) { parent48->childMaxVersion[lastChildrenIndex] = writeContext->zero; VALGRIND_MAKE_MEM_UNDEFINED(parent48->children + lastChildrenIndex, sizeof(parent48->children[0])); + VALGRIND_MAKE_MEM_UNDEFINED(parent48->reverseIndex + lastChildrenIndex, + sizeof(parent48->reverseIndex[0])); if (needsDownsize(parent48)) { downsize(parent48, writeContext);