diff --git a/ConflictSet.cpp b/ConflictSet.cpp index a1b6dc9..2f316a2 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -5635,6 +5635,9 @@ Node *firstGeqLogical(Node *n, const TrivialSpan key) { goto downLeftSpine; } else { n = nextSibling(n); + if (n == nullptr) { + return nullptr; + } goto downLeftSpine; } } @@ -5932,7 +5935,9 @@ checkMaxVersion(Node *root, Node *node, InternalVersionT oldestVersion, expected = std::max(expected, child->entry.rangeVersion); } } - auto key = getSearchPath(root); + // Account for the range version of the first key after `node`'s subtree: a + // range write spanning the subtree is recorded there. + auto key = getSearchPath(node); bool ok; auto inc = strinc(key, ok); if (ok) {