From efd240544310b37eda2619ddae2bcfa2e2582134 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 5 Jun 2024 12:41:07 -0700 Subject: [PATCH] Check "latestRoot" property --- VersionedMap.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VersionedMap.cpp b/VersionedMap.cpp index 3bd04af..933da46 100644 --- a/VersionedMap.cpp +++ b/VersionedMap.cpp @@ -962,6 +962,10 @@ struct __attribute__((__visibility__("hidden"))) VersionedMap::Impl { } roots.add(latestRoot, latestVersion); totalMallocBytes += mallocBytesDelta; + + // Check the "latestRoot is only meaningful in the callstack of + // addMutations" property + VALGRIND_MAKE_MEM_UNDEFINED(&latestRoot, sizeof(latestRoot)); } struct StepwiseFirstGeq {