Enable asserts in fuzz target
This commit is contained in:
@@ -275,14 +275,14 @@ struct MemManager {
|
||||
// in the stack, so we need 2 * kPathLengthUpperBound
|
||||
uint32_t stack[2 * kPathLengthUpperBound];
|
||||
int stackIndex = 0;
|
||||
auto tryPush = [&](uint32_t parent, uint32_t child) {
|
||||
auto tryPush = [&]([[maybe_unused]] uint32_t parent, uint32_t child) {
|
||||
if (!reachable.set(child)) {
|
||||
#if DEBUG_VERBOSE
|
||||
if (debugVerboseEnabled) {
|
||||
printf(" GC: reach: %u (parent %u)\n", child, parent);
|
||||
}
|
||||
#endif
|
||||
assert(stackIndex < sizeof(stack) / sizeof(stack[0]));
|
||||
assert(stackIndex < int(sizeof(stack) / sizeof(stack[0])));
|
||||
stack[stackIndex++] = child;
|
||||
}
|
||||
};
|
||||
@@ -344,7 +344,7 @@ struct MemManager {
|
||||
|
||||
// Entries to the right of max don't need to be in the freelist. They're
|
||||
// allocated by pointer bumping.
|
||||
for (int i = max + 1; i < next; ++i) {
|
||||
for (uint32_t i = max + 1; i < next; ++i) {
|
||||
if (base[i].entry != nullptr) {
|
||||
#if DEBUG_VERBOSE
|
||||
if (debugVerboseEnabled) {
|
||||
@@ -779,7 +779,7 @@ struct __attribute__((__visibility__("hidden"))) VersionedMap::Impl {
|
||||
const bool direction = finger.backDirection();
|
||||
finger.pop();
|
||||
auto &parent = finger.backNodeRef();
|
||||
auto old = parent;
|
||||
[[maybe_unused]] auto old = parent;
|
||||
parent = update(parent, direction, node, latestVersion);
|
||||
node = parent;
|
||||
}
|
||||
@@ -1272,31 +1272,22 @@ void VersionedMap::Impl::firstGeq(const weaselab::VersionedMap::Key *key,
|
||||
|
||||
const Entry *prev = nullptr;
|
||||
for (;;) {
|
||||
if (finger.searchPathSize() > 0) {
|
||||
materializeMutations(iterator[i].impl, prev, nullptr);
|
||||
if (iterator[i].impl->mutationCount > 0) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (finger.searchPathSize() == 0) {
|
||||
break;
|
||||
} else {
|
||||
materializeMutations(iterator[i].impl, prev, nullptr);
|
||||
for (int j = 0; j < iterator[i].impl->mutationCount; ++j) {
|
||||
if (geq(iterator[i].impl->mutations[j], key[i])) {
|
||||
iterator[i].impl->mutationIndex = j;
|
||||
goto loopEnd;
|
||||
}
|
||||
}
|
||||
}
|
||||
prev = iterator[i].impl->map->mm.base[finger.backNode()].entry;
|
||||
iterator[i].impl->map->move<std::memory_order_acquire, true>(
|
||||
finger, iterator[i].impl->version);
|
||||
}
|
||||
if (iterator[i].impl->mutationCount == 0) {
|
||||
assert(finger.searchPathSize() == 0);
|
||||
} else {
|
||||
[[maybe_unused]] bool match = false;
|
||||
for (int j = 0; j < iterator[i].impl->mutationCount; ++j) {
|
||||
if (geq(iterator[i].impl->mutations[j], key[i])) {
|
||||
iterator[i].impl->mutationIndex = j;
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(match);
|
||||
}
|
||||
loopEnd:;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user