diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 3273dc2..6635463 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -5631,6 +5631,9 @@ Node *firstGeqLogical(Node *n, const TrivialSpan key) { goto downLeftSpine; } else { n = nextSibling(n); + if (n == nullptr) { + return nullptr; + } goto downLeftSpine; } } @@ -5928,7 +5931,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) {