Merge pull request #14269 from blishko/smtchecker-fix-analysis-external-calls

[SMTChecker] Remember verification targets from trusted external calls
This commit is contained in:
Leo
2023-05-30 13:45:37 +02:00
committed by GitHub
4 changed files with 31 additions and 5 deletions
@@ -21,11 +21,8 @@ contract C {
// SMTIgnoreOS: macos
// ----
// Warning 4984: (47-50): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
// Warning 6328: (167-185): CHC: Assertion violation might happen here.
// Warning 6328: (215-233): CHC: Assertion violation might happen here.
// Warning 6328: (267-285): CHC: Assertion violation might happen here.
// Warning 6328: (304-322): CHC: Assertion violation happens here.
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
// Warning 2661: (47-50): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
// Warning 4661: (167-185): BMC: Assertion violation happens here.
// Warning 4661: (215-233): BMC: Assertion violation happens here.
// Warning 4661: (267-285): BMC: Assertion violation happens here.
@@ -0,0 +1,23 @@
contract C {
uint v;
bool guard = true;
function dec() public returns (uint) {
if (guard) return 0;
--v;
return v;
}
function f() public returns (uint) {
guard = false;
uint ret = this.dec();
guard = true;
return ret;
}
}
// ====
// SMTEngine: chc
// SMTTargets: underflow
// ----
// Warning 3944: (109-112): CHC: Underflow (resulting value less than 0) happens here.