Fix ICE when unsafe targets are solved more than once and the cex is different

This commit is contained in:
Leo Alt
2021-12-03 00:21:38 +01:00
committed by Kamil Śliwak
parent dcef56a531
commit 16535aae32
3 changed files with 43 additions and 2 deletions
@@ -0,0 +1,42 @@
==== Source: ExtCall.sol ====
interface Unknown {
function callme() external;
}
contract ExtCall {
uint x;
bool lock;
modifier mutex {
require(!lock);
lock = true;
_;
lock = false;
}
function setX(uint y) mutex public {
x = y;
}
function xMut(Unknown u) public {
uint x_prev = x;
u.callme();
assert(x_prev == x);
}
}
==== Source: ExtCall.t.sol ====
import "ExtCall.sol";
contract ExtCallTest {
ExtCall call;
function setUp() public {
call = new ExtCall();
}
}
// ====
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
// Warning 6328: (ExtCall.sol:362-381): CHC: Assertion violation happens here.
// Warning 4588: (ExtCall.t.sol:110-123): Assertion checker does not yet implement this type of function call.