franck44 / evm-dis

An EVM bytecode disassembler/assembler
Apache License 2.0
29 stars 6 forks source link

Fix computation of `WPreSeqSeg` and `SafeLoopFound` #12

Closed franck44 closed 9 months ago

franck44 commented 9 months ago

At the moment the detection of loop in SafeLoopBound is not fully implemented. What has to be implemented is a check whether the path can be reproduced.

This requires modifications of WPreSeqSeg to include the pre-conditions on the size of the stack (operands and capacity) along with the optional conditions on the stack element values.

First step is:

  1. fix the computation of WpreSeqSeg
  2. add an iteration to test all the previous nodes that have the same PC.