Skip to content

Commit

Permalink
Fix false positive in fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
cberner committed Sep 24, 2023
1 parent 6c0f3fb commit 40b3a1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fuzz/fuzz_targets/fuzz_redb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,10 @@ fn handle_table_op(op: &FuzzOperation, reference: &mut BTreeMap<u64, usize>, tab
}
drop(reference_iter);
reference.retain(|x, _| (*x < start || *x >= end) || *x % modulus != 0);
assert!(iter.next().is_none());
// This is basically assert!(iter.next().is_none()), but we also allow an Err such as SimulatedIOFailure
if let Some(Ok((_, _))) = iter.next() {
panic!();
}
}
FuzzOperation::Range {
start_key,
Expand Down

0 comments on commit 40b3a1f

Please sign in to comment.