ethereum / ethereum/mpz

mpz-memory: first check if allocated, then if set

Open
#265 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.