Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix corner case of binary search #41

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ void Counter::one_measurement_count(
int64_t num_explored = 0;
int64_t lower_fib = 0;
int64_t upper_fib = total_max_xors;
threshold_sols[total_max_xors] = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the sampling set is empty, total_max_xors can be 0, which in turn makes this set the number of solutions to 1. Fuzzer is smart! :)

sols_for_hash[total_max_xors] = 1;

int64_t hash_cnt = prev_measure;
int64_t hash_prev = hash_cnt;

Expand Down
Loading