mpz-memory: first check if allocated, then if set
Open
bug
- Dominant language
- Rust
- Stars
- 298
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
Currently the VisibilityView API allow this test to pass
```
#[test]
fn test() {
let mut view = VisibilityView::new();
view.alloc(10);
assert!(view.is_set(20..30));
}
```
It obviously shouldn't pass since the range 20..30 was not allocated.
Is the caller responsible for passing only the ranges which were allocated or is this a bug that needs fixing @sinui0
Contributor guide
Assessment
This issue has not been assessed yet.