Missing array index OOB check
Open
comp: analyzer
type: bug
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 218
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
### What is wrong?
See the following code:
https://github.com/ethereum/fe/blob/7054185bae601702dc6b15ecf752d8810222a9fd/crates/tests/fixtures/files/arrays.fe#L68-L102
### How can it be fixed
Add a compile-time check for array indices.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with crates/tests/fixtures/files/arrays.fe at lines 68-102, then trace how the compiler handles the array indexing shown there. Confirm the expected behavior for an out-of-bounds constant index and add coverage for the compile-time diagnostic. Done means invalid array indices are rejected during compilation while valid indices continue to compile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100