Fantom-foundation / Tosca

Other
8 stars 14 forks source link

CT failed to identify gas computation issue in LOG operations #542

Open HerbertJordan opened 2 months ago

HerbertJordan commented 2 months ago

Recent initial attempts to introduce fuzzing to the portfolio of our test infrastructure has revealed an issue in LFVM's implementation of the LOG operations. The issue has been fixed by #541.

It would be interesting to understand why this issue was not detected by the CT infrastructure - and if possible this issue should be fixed. Furthermore, if it is an example for a general class of issues, the CT test case generation process may be improved to cover those types of issues for a wider range of situations.

facuMH commented 2 months ago

While looking into increasing lfvm coverage I came upon a similar issue, where a branch was not reached because of the combination of parameters between Gas samples and MemoryOffset sizes would always exit with not enough gas, before even trying to ensure capacity. An attempted fix is presented in #564