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

adding roaring64 to fuzzer as a step toward solving issue 662 #670

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

lemire
Copy link
Member

@lemire lemire commented Oct 1, 2024

We do not, currently, ensure that roaring64_bitmap_portable_deserialize_safe leaves the bitmap in a proper state after deserialization. This addition to the fuzzer might help.

Related to #662

@lemire lemire requested a review from Dr-Emann October 1, 2024 17:56
@lemire lemire merged commit 71576fb into master Oct 1, 2024
38 checks passed
@lemire
Copy link
Member Author

lemire commented Oct 1, 2024

I'll merge eagerly.

Comment on lines +81 to +90
int r;
r = bitmap32(data, size);
if (r) {
return r;
}
r = bitmap64(data, size);
if (r) {
return r;
}
return 0;
Copy link
Member

Choose a reason for hiding this comment

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

I've found that the fuzzer does a better job exploring the possibility space if you have it chose between operations rather than just running multiple operations. It can better find interesting inputs for each operation, rather than wasting time running what's interesting for one operation for other operations. I think the fuzzer would be more efficient if we do something like:

if (size == 0) { return 0; }
if (data[0] % 2 == 0) {
  return bitmap32(data + 1, size - 1);
} else {
  return bitmap64(data + 1, size - 1);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants