ethereum / fe

Emerging smart contract language for the Ethereum blockchain.
https://fe-lang.org
Other
1.61k stars 187 forks source link

Missing array index OOB check #877

Open g-r-a-n-t opened 1 year ago

g-r-a-n-t commented 1 year ago

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.