solidity/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_crypto.sol

34 lines
777 B
Solidity
Raw Normal View History

2020-12-18 18:10:32 +00:00
abstract contract D {
function d() virtual public;
}
contract C {
bytes data;
bytes32 kec;
constructor(bytes memory _data) {
data = _data;
kec = keccak256(data);
}
2020-12-28 18:49:10 +00:00
function check(bytes memory _data) public view {
2020-12-18 18:10:32 +00:00
bytes32 _kec = keccak256(data);
2020-12-28 18:49:10 +00:00
assert(_kec == kec); // should hold
assert(kec == keccak256(_data)); // should fail
2020-12-18 18:10:32 +00:00
}
function ext(D d) public {
d.d();
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
2020-12-28 18:49:10 +00:00
// ----
2021-03-31 15:11:54 +00:00
// Warning 1218: (302-333): CHC: Error trying to invoke SMT solver.
// Warning 6328: (302-333): CHC: Assertion violation might happen here.
// Warning 1218: (302-333): CHC: Error trying to invoke SMT solver.
// Warning 6328: (302-333): CHC: Assertion violation might happen here.
// Warning 4661: (302-333): BMC: Assertion violation happens here.