2022-10-26 10:13:47 +00:00
|
|
|
{
|
|
|
|
"errors":
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"component": "general",
|
|
|
|
"errorCode": "3944",
|
|
|
|
"formattedMessage": "Warning: CHC: Underflow (resulting value less than 0) happens here.
|
2021-01-19 11:56:22 +00:00
|
|
|
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-01-19 11:56:22 +00:00
|
|
|
--> A:8:7:
|
|
|
|
|
|
|
|
|
8 | \t\t\t\t\t\t--x;
|
|
|
|
| \t\t\t\t\t\t^^^
|
|
|
|
|
2022-10-26 10:13:47 +00:00
|
|
|
",
|
|
|
|
"message": "CHC: Underflow (resulting value less than 0) happens here.
|
2021-01-19 11:56:22 +00:00
|
|
|
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 = []
|
2022-10-26 10:13:47 +00:00
|
|
|
test.f(0x0, 0)",
|
|
|
|
"severity": "warning",
|
|
|
|
"sourceLocation":
|
|
|
|
{
|
|
|
|
"end": 177,
|
|
|
|
"file": "A",
|
|
|
|
"start": 174
|
|
|
|
},
|
|
|
|
"type": "Warning"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"sources":
|
|
|
|
{
|
|
|
|
"A":
|
|
|
|
{
|
|
|
|
"id": 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|