forked from weaselab/conflict-set
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.
This commit is contained in:
+1
-1
@@ -4981,7 +4981,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
}
|
}
|
||||||
if (e != nullptr) {
|
if (e != nullptr) {
|
||||||
while (e->releaseDeferred) {
|
while (e->releaseDeferred) {
|
||||||
e = b->forwardTo;
|
e = e->forwardTo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr, "search path: %s, begin: %s\n",
|
fprintf(stderr, "search path: %s, begin: %s\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user