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 {