2018-10-18 13:03:52 +00:00
|
|
|
contract C
|
|
|
|
{
|
|
|
|
function f() public payable {
|
|
|
|
assert(msg.data.length > 0);
|
2020-10-13 11:47:03 +00:00
|
|
|
// Fails since calldata size should be 4
|
|
|
|
assert(msg.data.length > 4);
|
|
|
|
// f's sig is 0x26121ff0
|
|
|
|
assert(msg.data[0] == 0x26);
|
|
|
|
assert(msg.data[1] == 0x12);
|
|
|
|
assert(msg.data[2] == 0x1f);
|
|
|
|
assert(msg.data[3] == 0xf0);
|
|
|
|
}
|
|
|
|
function g() public payable {
|
|
|
|
// g's sig is 0xe2179b8e
|
|
|
|
assert(msg.data[0] == 0xe2);
|
|
|
|
assert(msg.data[1] == 0x17);
|
|
|
|
assert(msg.data[2] == 0x9b);
|
|
|
|
// Fails
|
|
|
|
assert(msg.data[3] == 0x8f);
|
2018-10-18 13:03:52 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2021-07-16 13:44:36 +00:00
|
|
|
// SMTIgnoreCex: yes
|
2018-10-18 13:03:52 +00:00
|
|
|
// ----
|
2021-07-16 13:44:36 +00:00
|
|
|
// Warning 6328: (120-147): CHC: Assertion violation happens here.
|
|
|
|
// Warning 6328: (467-494): CHC: Assertion violation happens here.
|