crytic / rattle

evm binary static analysis
https://www.trailofbits.com/presentations/rattle/
344 stars 41 forks source link

Failure to identify internal call results in wrong CFG #24

Closed CarstenNZ closed 2 years ago

CarstenNZ commented 2 years ago

Git a3fa9c7c773bc8c805317df597da1f216f1b9293

Function luckyNumberOfAddress of the Lottery example.

The body of luckyNumberOfAddress is factorized by the compiler into an internal helper function that is used by luckyNumberOfAddress and participate.

Rattle fails to identify the helper function and consequently pulls part of the participate body (after the call) into the luckyNumberOfAddress body.

2022-05-02 08_36_38-luckyNumberOfAddress(address)

CarstenNZ commented 2 years ago

After starting to work on this problem and re-reading the rattle description I realized that identifying internal functions is beyond rattle's original scope. So I close it here and will extend in my rattle_code fork.