-
Notifications
You must be signed in to change notification settings - Fork 5
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
Errors in iter1()
#6
Labels
bug
Something isn't working
Comments
Cydhra
added a commit
that referenced
this issue
Jun 25, 2024
…s the last block of a super block, because it accessed metadata of the next super block fix: Issue #6, which happened because the number of ones in a block was incorrectly calculated (I forgot to subtract zeros of other super blocks)
Fixed in 685b673. Released as 1.3.2 on crates.io. |
Cydhra
added a commit
that referenced
this issue
Jun 28, 2024
* added test case testing the correct construction of the block structure, and one that tests issue #6 * fix: last_block check in select iterators failed if the last_block was the last block of a super block, because it accessed metadata of the next super block fix: Issue #6, which happened because the number of ones in a block was incorrectly calculated (I forgot to subtract zeros of other super blocks) * code style * #8: storing the last word in the select-iterator makes no sense, because we cannot safely compare the rank within a block to the ranks within the word, since we do not have access to the popcounts of previous words. We could keep track of them, but there are 8 words in a block, it's not worth it. * Added a fuzzing test for iter0 and iter1 * bumped patch version to 1.3.3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very cool crate! I ran into some cases where
iter1()
returns incorrect results - it appears to skip blocks of ~8 ONE bits. I augmentedtest_random_data_rank()
with some tests of iter0/1 and ran into a crash. The test below will fail withthread 'bit_vec::fast_rs_vec::tests::test_random_data_rank' panicked at src/bit_vec/fast_rs_vec/iter.rs:327:19: attempt to shift left with overflow
on x86_64. I get the same failure with and withouttarget-cpu=native
Test:
Relevant stack:
The text was updated successfully, but these errors were encountered: