From 0df09743dacc09148276ac19d5b83527a29fcc62 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 30 Oct 2024 15:33:40 -0700 Subject: [PATCH] Don't assign to nextRangeWrite twice --- ConflictSet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 49734bd..820dc40 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -4949,7 +4949,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { lastRangeWrite->nextRangeWrite = context.results + i; } lastRangeWrite = context.results + i; - lastRangeWrite->nextRangeWrite = nullptr; while (context.results[i].endInsertionPoint->releaseDeferred) { context.results[i].endInsertionPoint = context.results[i].endInsertionPoint->forwardTo; @@ -4962,6 +4961,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { context.results[i].endInsertionPoint = endNode; } } + if (firstRangeWrite != nullptr) { + lastRangeWrite->nextRangeWrite = nullptr; + } // Phase 3: Erase nodes within written ranges. Going left to right ensures // that nothing later is on the search path of anything earlier, so we don't