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

fuzz: add regression test for value encoding #280

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

apoelstra
Copy link
Collaborator

Despite the branch name this does not fix the Windows build. It adds a regression test for value encoding, which after running 250 CPU-hours locally has failed to find any regressions. But I did find some unrelated issues, mainly around memory allocations.

Fixes #279

Fixes #278

@apoelstra apoelstra force-pushed the 2025-03--fix-windows branch from 19661c5 to 10fc3c6 Compare March 21, 2025 20:39
@apoelstra
Copy link
Collaborator Author

Ok, I tweaked the fuzz test and now I think I have found a regression. Value::left(1, (1 + 1) + (1 + 1)) seems to have different behavior in 0.3.0 vs master.

@@ -798,7 +798,7 @@ impl Iterator for CompactBitsIter<'_> {

fn next(&mut self) -> Option<Self::Item> {
while let Some(value) = self.stack.pop() {
if value.is_unit() {
if value.ty.bit_width() == 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

626246c: Nice catch

Copy link
Collaborator

@uncomputable uncomputable left a comment

Choose a reason for hiding this comment

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

ACK 10fc3c6

@apoelstra
Copy link
Collaborator Author

I broke my local CI with this -- I think because 0.3.0 is the same version in the git repo and on crates.io, so it struggles to include both of them.

Let's do #270 first, which includes a version bump to avoid this issue.

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