solidity icon indicating copy to clipboard operation
solidity copied to clipboard

SMTChecker: Fail to parse abi.encodeCall

Open Subway2023 opened this issue 10 months ago • 0 comments

Description

0.8.14 release claims that the SMTChecker supports the abi.encodeCall. However, when using abi.encodeCall to encode function, SMTChecker will crash

Environment

  • Compiler version: 0.8.25
  • Target EVM version (as per compiler settings): No restrictions
  • Framework/IDE (e.g. Truffle or Remix): Remix and Command-line
  • EVM execution environment / backend / blockchain client: None
  • Operating system: Linux

Steps to Reproduce

contract C {
    function f()public {
        bytes memory result=abi.encodeCall(this.f, ());
        assert(result.length==4);
    }
}

Remix

1712287544633 Successfully executed.

Command-line

solc C.sol --model-checker-ext-calls trusted --model-checker-timeout 0 --model-checker-engine chc --model-checker-solvers z3

or

solc C.sol --model-checker-ext-calls trusted --model-checker-timeout 0 --model-checker-engine bmc --model-checker-bmc-loop-iterations 10 --model-checker-solvers z3

1712287707139

SMTChecker crash

Subway2023 avatar Apr 05 '24 03:04 Subway2023