From 9a2c64d31cef3eb5c7ed980ddd623dc9d364811e Mon Sep 17 00:00:00 2001 From: Weaselbot Date: Sun, 30 Aug 2026 20:17:22 -0400 Subject: [PATCH] Fix broken endInsertionPoint forwarding chain resolution in DEBUG_VERBOSE print In the Phase 2 debug block of ConflictSet::Impl::interleavedWrites, the loop resolving the end insertion point's releaseDeferred/forwardTo chain followed the begin node's chain instead (e = b->forwardTo). Once b is resolved, b->forwardTo aliases the Entry union member, so e was assigned garbage derived from version bytes and the loop dereferenced it, causing a SEGV or hang whenever DEBUG_VERBOSE builds traced writes. Use the end node's own forwarding chain (e = e->forwardTo), matching the production code in the same loop body and in Phase 3. --- ConflictSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 2ee75c9..3538392 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -4981,7 +4981,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { } if (e != nullptr) { while (e->releaseDeferred) { - e = b->forwardTo; + e = e->forwardTo; } } fprintf(stderr, "search path: %s, begin: %s\n", -- 2.43.0