You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
contractCaller {
int a;
function f() public {
a=1;
}
function g()public{
bytesmemory payload=abi.encodeWithSignature("f()");
address(this).call(payload);
assert(a==1);
}
}
solc C.sol --model-checker-engine all
The text was updated successfully, but these errors were encountered:
cameel
changed the title
SMTChecker: SMTChecker: Unable to accurately determine the modification of global variables by functions called using call()
SMTChecker: Unable to accurately determine the modification of global variables by functions called using call()
Apr 12, 2024
SMTChecker cannot model precisely what ABI methods like encodeWithSignature compute.
To stay sound, it over-approximates the possible behaviour.
This means that it only models the basic functional property: they yield equal output for equal inputs.
Otherwise, it assumes that the result can be any value.
Similarly, it over-approximates the behaviour of call method. This can potentially call any external code, which can do anything.
This over-approximating modeling results in false positives that you see in this issue, but keeps the encoding sane.
Description
When a function called using call() modifies global variables, SMTChecker is unable to determine the final value of the global variables
Environment
The text was updated successfully, but these errors were encountered: