2021-01-19 11:56:22 +00:00
|
|
|
{"errors":[{"component":"general","errorCode":"3944","formattedMessage":"Warning: CHC: Underflow (resulting value less than 0) happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
|
|
|
test.f(0, 0)
|
|
|
|
--> A:8:7:
|
|
|
|
|
|
|
|
|
8 | \t\t\t\t\t\t--x;
|
|
|
|
| \t\t\t\t\t\t^^^
|
|
|
|
|
|
|
|
","message":"CHC: Underflow (resulting value less than 0) happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-03-31 15:31:23 +00:00
|
|
|
test.f(0, 0)","severity":"warning","sourceLocation":{"end":177,"file":"A","start":174},"type":"Warning"},{"component":"general","errorCode":"4984","formattedMessage":"Warning: CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
2021-01-19 11:56:22 +00:00
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 1
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
|
|
|
test.f(0, 2)
|
|
|
|
--> A:9:7:
|
|
|
|
|
|
|
|
|
9 | \t\t\t\t\t\tx + type(uint).max;
|
|
|
|
| \t\t\t\t\t\t^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
","message":"CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 1
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-03-31 15:31:23 +00:00
|
|
|
test.f(0, 2)","severity":"warning","sourceLocation":{"end":203,"file":"A","start":185},"type":"Warning"},{"component":"general","errorCode":"4281","formattedMessage":"Warning: CHC: Division by zero happens here.
|
2021-01-19 11:56:22 +00:00
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
|
|
|
test.f(0, 1)
|
|
|
|
--> A:10:7:
|
|
|
|
|
|
|
|
|
10 | \t\t\t\t\t\t2 / x;
|
|
|
|
| \t\t\t\t\t\t^^^^^
|
|
|
|
|
|
|
|
","message":"CHC: Division by zero happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-03-31 15:31:23 +00:00
|
|
|
test.f(0, 1)","severity":"warning","sourceLocation":{"end":216,"file":"A","start":211},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here.
|
2021-01-19 11:56:22 +00:00
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
|
|
|
test.f(0, 1)
|
|
|
|
--> A:12:7:
|
|
|
|
|
|
|
|
|
12 | \t\t\t\t\t\tassert(x > 0);
|
|
|
|
| \t\t\t\t\t\t^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
","message":"CHC: Assertion violation happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-03-31 15:31:23 +00:00
|
|
|
test.f(0, 1)","severity":"warning","sourceLocation":{"end":258,"file":"A","start":245},"type":"Warning"},{"component":"general","errorCode":"2529","formattedMessage":"Warning: CHC: Empty array \"pop\" happens here.
|
2021-01-19 11:56:22 +00:00
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
|
|
|
test.f(0, 1)
|
|
|
|
--> A:13:7:
|
|
|
|
|
|
|
|
|
13 | \t\t\t\t\t\tarr.pop();
|
|
|
|
| \t\t\t\t\t\t^^^^^^^^^
|
|
|
|
|
|
|
|
","message":"CHC: Empty array \"pop\" happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-03-31 15:31:23 +00:00
|
|
|
test.f(0, 1)","severity":"warning","sourceLocation":{"end":275,"file":"A","start":266},"type":"Warning"},{"component":"general","errorCode":"6368","formattedMessage":"Warning: CHC: Out of bounds access happens here.
|
2021-03-23 18:15:14 +00:00
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
|
|
|
test.f(0, 1)
|
|
|
|
--> A:14:7:
|
|
|
|
|
|
|
|
|
14 | \t\t\t\t\t\tarr[x];
|
|
|
|
| \t\t\t\t\t\t^^^^^^
|
|
|
|
|
|
|
|
","message":"CHC: Out of bounds access happens here.
|
|
|
|
Counterexample:
|
|
|
|
arr = []
|
|
|
|
a = 0
|
|
|
|
x = 0
|
|
|
|
|
|
|
|
Transaction trace:
|
|
|
|
test.constructor()
|
|
|
|
State: arr = []
|
2021-03-31 15:31:23 +00:00
|
|
|
test.f(0, 1)","severity":"warning","sourceLocation":{"end":289,"file":"A","start":283},"type":"Warning"}],"sources":{"A":{"id":0}}}
|