christoftorres / ConFuzzius

A data dependency-aware hybrid fuzzer for Ethereum smart contracts (EuroS&P 2021).
MIT License
86 stars 27 forks source link

Value 1099511627776 cannot be encoded in 40 bits. #3

Closed banescusebi closed 3 years ago

banescusebi commented 3 years ago

Hey, I'm running the tool on a contract that uses uint40 variables as input params and return values of functions, gives the following error:

2021-07-01 15:04:33,104 - Analysis - INFO - Generation number 0          Code coverage: 29.95% (2016/6731)         Branch coverage: 31.76% (108/340)       Transactions: 57 (56 unique)            Time: 0.3796710968017578
2021-07-01 15:04:33,558 - Analysis - INFO - Generation number 1          Code coverage: 29.95% (2016/6731)         Branch coverage: 31.76% (108/340)       Transactions: 102 (81 unique)           Time: 0.8341164588928223
2021-07-01 15:04:34,472 - Individual - ERROR - Value 1099511627776 cannot be encoded in 40 bits.  Must be bounded between [0, 1099511627775]
2021-07-01 15:04:34,473 - Individual - ERROR - 0xf5faf0ce: ['uint40'] -> [1099511627776]
2021-07-01 15:04:34,474 - Analysis - INFO - -----------------------------------------------------
2021-07-01 15:04:34,474 - Analysis - INFO - Number of generations:       2
2021-07-01 15:04:34,474 - Analysis - INFO - Number of transactions:      102 (81 unique)
2021-07-01 15:04:34,474 - Analysis - INFO - Transactions per second:     58
2021-07-01 15:04:34,474 - Analysis - INFO - Total code coverage:         29.95% (2016/6731)
2021-07-01 15:04:34,474 - Analysis - INFO - Total branch coverage:       31.76% (108/340)
2021-07-01 15:04:34,475 - Analysis - INFO - Total execution time:        1.75 seconds
2021-07-01 15:04:34,475 - Analysis - INFO - Total memory consumption:    110.65 MB

Any suggestions on how to get past this error?

christoftorres commented 3 years ago

Hi @banescusebi, thanks for reporting! We analyzed this bug and fixed it with our latest commit. Please check it out and let us know if the error still occurs.