More valgrind annotations
This commit is contained in:
@@ -1501,6 +1501,8 @@ void consumePartialKeyFull(TaggedNodePointer &self, TrivialSpan &key,
|
||||
memmove(old->partialKey(), old->partialKey() + partialKeyIndex + 1,
|
||||
old->partialKeyLen - (partialKeyIndex + 1));
|
||||
old->partialKeyLen -= partialKeyIndex + 1;
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(old->partialKey() + old->partialKeyLen,
|
||||
partialKeyIndex + 1);
|
||||
|
||||
// Maintain memory capacity invariant
|
||||
maybeDecreaseCapacity(old, writeContext, impl);
|
||||
@@ -2061,6 +2063,12 @@ Node *erase(Node *self, WriteContext *writeContext, ConflictSet::Impl *impl,
|
||||
parent3->children[i] = parent3->children[i + 1];
|
||||
parent3->childMaxVersion[i] = parent3->childMaxVersion[i + 1];
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent3->index + parent3->numChildren,
|
||||
sizeof(parent3->index[0]));
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent3->children + parent3->numChildren,
|
||||
sizeof(parent3->children[0]));
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent3->childMaxVersion + parent3->numChildren,
|
||||
sizeof(parent3->childMaxVersion[0]));
|
||||
|
||||
if (needsDownsize(parent3)) {
|
||||
downsize(parent3, writeContext, impl);
|
||||
@@ -2076,6 +2084,13 @@ Node *erase(Node *self, WriteContext *writeContext, ConflictSet::Impl *impl,
|
||||
parent16->children[i] = parent16->children[i + 1];
|
||||
parent16->childMaxVersion[i] = parent16->childMaxVersion[i + 1];
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent16->index + parent16->numChildren,
|
||||
sizeof(parent16->index[0]));
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent16->children + parent16->numChildren,
|
||||
sizeof(parent16->children[0]));
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent16->childMaxVersion +
|
||||
parent16->numChildren,
|
||||
sizeof(parent16->childMaxVersion[0]));
|
||||
|
||||
if (needsDownsize(parent16)) {
|
||||
downsize(parent16, writeContext, impl);
|
||||
@@ -2104,6 +2119,8 @@ Node *erase(Node *self, WriteContext *writeContext, ConflictSet::Impl *impl,
|
||||
parent48->reverseIndex[toRemoveChildrenIndex] = parentIndex;
|
||||
}
|
||||
parent48->childMaxVersion[lastChildrenIndex] = writeContext->zero;
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(parent48->children + lastChildrenIndex,
|
||||
sizeof(parent48->children[0]));
|
||||
|
||||
if (needsDownsize(parent48)) {
|
||||
downsize(parent48, writeContext, impl);
|
||||
|
Reference in New Issue
Block a user