Fix a use of an invalid iterator
This commit is contained in:
@@ -955,7 +955,10 @@ struct __attribute__((__visibility__("hidden"))) VersionedMap::Impl {
|
|||||||
if (engulfLeft && engulfRight) {
|
if (engulfLeft && engulfRight) {
|
||||||
insert({next->getKey(), next->keyLen}, {}, /*endRange*/ true, copy);
|
insert({next->getKey(), next->keyLen}, {}, /*endRange*/ true, copy);
|
||||||
if (found) {
|
if (found) {
|
||||||
remove(iter);
|
move<std::memory_order_relaxed, false>(copy, latestVersion);
|
||||||
|
// Point to the same entry as iter pointed to, but it's not
|
||||||
|
// invalidated
|
||||||
|
remove(copy);
|
||||||
}
|
}
|
||||||
} else if (engulfLeft) {
|
} else if (engulfLeft) {
|
||||||
assert(found);
|
assert(found);
|
||||||
|
Reference in New Issue
Block a user