2021-01-19 11:56:22 +00:00
|
|
|
Warning: CHC: Underflow (resulting value less than 0) happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
2021-09-16 17:18:26 +00:00
|
|
|
a = 0x0
|
2021-01-19 11:56:22 +00:00
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-09-16 17:18:26 +00:00
|
|
|
test.f(0x0, 0)
|
2021-03-31 15:31:23 +00:00
|
|
|
--> model_checker_targets_underflow_overflow_chc/input.sol:7:3:
|
2021-01-19 11:56:22 +00:00
|
|
|
|
|
2021-03-31 15:31:23 +00:00
|
|
|
7 | --x;
|
2021-01-19 11:56:22 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
Warning: CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
2021-09-16 17:18:26 +00:00
|
|
|
a = 0x0
|
2021-01-19 11:56:22 +00:00
|
|
|
x = 1
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-09-16 17:18:26 +00:00
|
|
|
test.f(0x0, 2)
|
2021-03-31 15:31:23 +00:00
|
|
|
--> model_checker_targets_underflow_overflow_chc/input.sol:8:3:
|
2021-01-19 11:56:22 +00:00
|
|
|
|
|
2021-03-31 15:31:23 +00:00
|
|
|
8 | x + type(uint).max;
|
2021-01-19 11:56:22 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|