crytic / rattle

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

Fixing #23

Closed CarstenNZ closed 2 years ago

CarstenNZ commented 2 years ago

Add regression testing

Background

I started to test a slither SSA example with Rattle, but the created CFG is wrong. See graph below, both edges from BB 0x5d go directly to BB 0x6d without any representation of the if/else bodies.

Any fix attempt (not in this PR) needs regression testing.

Changes

Idea is to add regression testing with the existing input examples while preserving the current state of rattle as much as possible.

The regression tests capture the SSA output from rattle's stdout and compare it with the expected outputs in .../tests/expected directory. The initial version of the expected output is rattle's current output (right or wrong).

Inked_unknown_0x4cd13d28()_LI

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.