Merge pull request #6764 from ethereum/smt_fix_tuple_ice

[SMTChecker] Fix ICE in unsupported function calls with multi return values
This commit is contained in:
chriseth
2019-05-20 15:18:11 +02:00
committed by GitHub
10 changed files with 69 additions and 27 deletions
@@ -36,8 +36,6 @@ library MerkleProof {
// ----
// Warning: (755-767): Assertion checker does not yet support this expression.
// Warning: (988-1032): Assertion checker does not yet implement this type of function call.
// Warning: (988-1032): Internal error: Expression undefined for SMT solver.
// Warning: (1175-1219): Assertion checker does not yet implement this type of function call.
// Warning: (1175-1219): Internal error: Expression undefined for SMT solver.
// Warning: (755-767): Assertion checker does not yet support this expression.
// Warning: (769-772): Overflow (resulting value larger than 2**256 - 1) happens here
@@ -83,12 +83,10 @@ contract InternalCall {
// Warning: (1144-1206): Function state mutability can be restricted to pure
// Warning: (1212-1274): Function state mutability can be restricted to pure
// Warning: (1280-1342): Function state mutability can be restricted to pure
// Warning: (714-749): Internal error: Expression undefined for SMT solver.
// Warning: (799-811): Assertion checker does not yet support the type of this literal (literal_string "helloTwo()").
// Warning: (782-813): Type conversion is not yet fully supported and might yield false positives.
// Warning: (771-814): Assertion checker does not yet implement this type of function call.
// Warning: (825-830): Assertion checker does not yet support the type of this variable.
// Warning: (887-919): Internal error: Expression undefined for SMT solver.
// Warning: (690-750): Underflow (resulting value less than 0) happens here
// Warning: (690-750): Overflow (resulting value larger than 2**160 - 1) happens here
// Warning: (1057-1068): Assertion checker does not yet implement type function () returns (uint256)
@@ -9,6 +9,5 @@ contract C {
// ----
// Warning: (133-143): Unused local variable.
// Warning: (133-143): Assertion checker does not yet support the type of this variable.
// Warning: (146-163): Assertion checker does not yet implement this expression.
// Warning: (146-163): Internal error: Expression undefined for SMT solver.
// Warning: (146-163): Assertion checker does not yet implement this type.
// Warning: (146-163): Assertion checker does not yet implement this expression.
@@ -0,0 +1,12 @@
pragma experimental SMTChecker;pragma experimental ABIEncoderV2;
contract C {
function f() public pure returns (bytes memory, bytes memory) {
return (abi.encode(""), abi.encodePacked( "7?8r"));
}
}
// ----
// Warning: (31-64): Experimental features are turned on. Do not use experimental features on live deployments.
// Warning: (173-175): Assertion checker does not yet support the type of this literal (literal_string "").
// Warning: (162-176): Assertion checker does not yet implement this type of function call.
// Warning: (196-202): Assertion checker does not yet support the type of this literal (literal_string "7?8r").
// Warning: (178-203): Assertion checker does not yet implement this type of function call.
@@ -16,5 +16,4 @@ contract D
}
}
// ----
// Warning: (180-187): Internal error: Expression undefined for SMT solver.
// Warning: (191-206): Assertion violation happens here
@@ -0,0 +1,12 @@
pragma experimental SMTChecker;
contract C {
function g() public pure returns (uint, uint) {
uint a;
uint b;
(a, b) = g();
}
}
//
// ----
// Warning: (126-129): Assertion checker does not support recursive function calls.
@@ -0,0 +1,28 @@
pragma experimental SMTChecker;
contract c { function f() public pure {22237625-86535-0+1;
555565-3*51;
}
}contract C {
function g() public pure returns (
uint,
uint,
uint,
uint,
uint,
uint,
uint,
uint,
uint,
uint,
int, uint, bytes14) {
uint
a;
uint b;
(,,,,,,,a,b,,,,) = g();
}
}
// ----
// Warning: (72-90): Statement has no effect.
// Warning: (96-107): Statement has no effect.
// Warning: (304-307): Assertion checker does not support recursive function calls.
@@ -18,7 +18,5 @@ contract C
}
// ----
// Warning: (86-93): Assertion checker does not support recursive function calls.
// Warning: (86-93): Internal error: Expression undefined for SMT solver.
// Warning: (86-93): Assertion checker does not support recursive function calls.
// Warning: (86-93): Internal error: Expression undefined for SMT solver.
// Warning: (253-266): Assertion violation happens here
@@ -17,8 +17,8 @@ contract C
// Warning: (157-170): Unused local variable.
// Warning: (157-170): Assertion checker does not yet support the type of this variable.
// Warning: (139-146): Assertion checker does not yet implement this type.
// Warning: (149-153): Assertion checker does not yet implement this type.
// Warning: (149-153): Assertion checker does not yet implement this expression.
// Warning: (139-153): Assertion checker does not yet implement type struct C.S storage ref
// Warning: (173-177): Assertion checker does not yet implement this expression.
// Warning: (173-177): Internal error: Expression undefined for SMT solver.
// Warning: (173-177): Assertion checker does not yet implement this type.
// Warning: (173-177): Assertion checker does not yet implement this expression.