RoaringBitmap / RoaringBitmap/roaring-rs
`roaring::RoaringBitmap::full().statistics()` panics if overflow checks are enabled
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 957
- Forks
- 119
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 1
Description
thread 'main' (3828616) panicked at roaring-0.11.4/src/bitmap/statistics.rs:92:21
This points at
https://github.com/RoaringBitmap/roaring-rs/blob/83caaca2ec5ea29e27dc19f930b9450b9a246b5b/roaring/src/bitmap/statistics.rs#L92
The cardinality of the bitmap is exactly 232 (across 216 run containers), so it blows up when collecting the last container as it needs to store a value above u32::MAX.
Probably not a big issue, but it was a bit surprising to hit that first thing when trying to compare RoaringBitmap::new() and RoaringBitmap::full().
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at roaring/src/bitmap/statistics.rs:92 and reproduce the panic with RoaringBitmap::full().statistics() while overflow checks are enabled. Trace how the final run container contributes to the cardinality, then verify that statistics handles the exact 2^32-cardinality bitmap without panicking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100