crytic / slither

Static Analyzer for Solidity and Vyper
https://blog.trailofbits.com/2018/10/19/slither-a-solidity-static-analysis-framework/
GNU Affero General Public License v3.0
5.27k stars 964 forks source link

Yul calldata offset and length support #1056

Open hkalodner opened 2 years ago

hkalodner commented 2 years ago

Describe the desired feature

In solidity 0.7.5, .offset and .length were added to calldata variables of dynamic arrays in yul as described in https://blog.soliditylang.org/2020/11/18/solidity-0.7.5-release-announcement/.

It appears that currently slither is missing support for those cause code that makes use of that to fail inside the Yul parser. Support should be similar to the existing support of .slot and .offset for storage variables.

I'm planning on submitting a PR with a proposed fix, but I wanted to open an issue as well in case their are issues with the PR

chichke commented 2 years ago

Yes, please add support 💯

0xalpharush commented 2 years ago

Integration tests https://github.com/ethereum/solidity/tree/develop/test/libsolidity/syntaxTests/inlineAssembly