mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Fix ICE in abi.decode
This commit is contained in:
@@ -35,6 +35,8 @@ library MerkleProof {
|
||||
|
||||
// ----
|
||||
// Warning: (755-767): Assertion checker does not yet support this expression.
|
||||
// Warning: (988-991): Assertion checker does not yet implement type abi
|
||||
// Warning: (988-1032): Assertion checker does not yet implement this type of function call.
|
||||
// Warning: (1175-1178): Assertion checker does not yet implement type abi
|
||||
// Warning: (1175-1219): Assertion checker does not yet implement this type of function call.
|
||||
// Warning: (755-767): Assertion checker does not yet support this expression.
|
||||
|
||||
@@ -83,7 +83,7 @@ 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: (771-774): Assertion checker does not yet implement type abi
|
||||
// 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: (1403-1408): Assertion checker does not yet implement this type of function call.
|
||||
|
||||
@@ -9,5 +9,6 @@ contract C {
|
||||
// ----
|
||||
// Warning: (133-143): Unused local variable.
|
||||
// Warning: (133-143): Assertion checker does not yet support the type of this variable.
|
||||
// Warning: (146-147): Assertion checker does not yet implement type type(struct C.A storage pointer)
|
||||
// Warning: (146-163): Assertion checker does not yet implement type struct C.A memory
|
||||
// Warning: (146-163): Assertion checker does not yet implement this expression.
|
||||
|
||||
@@ -6,5 +6,7 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// Warning: (31-64): Experimental features are turned on. Do not use experimental features on live deployments.
|
||||
// Warning: (162-165): Assertion checker does not yet implement type abi
|
||||
// Warning: (162-176): Assertion checker does not yet implement this type of function call.
|
||||
// Warning: (178-181): Assertion checker does not yet implement type abi
|
||||
// Warning: (178-203): Assertion checker does not yet implement this type of function call.
|
||||
|
||||
@@ -16,3 +16,5 @@ contract C
|
||||
assert(y < 10000);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (228-229): Assertion checker does not yet implement type type(library L)
|
||||
|
||||
@@ -17,4 +17,5 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (228-229): Assertion checker does not yet implement type type(library L)
|
||||
// Warning: (245-261): Assertion violation happens here
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
pragma experimental SMTChecker;
|
||||
pragma experimental "ABIEncoderV2";
|
||||
|
||||
contract C {
|
||||
struct S { uint x; uint[] b; }
|
||||
function f() public pure returns (S memory, bytes memory) {
|
||||
return abi.decode("abc", (S, bytes));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (32-67): Experimental features are turned on. Do not use experimental features on live deployments.
|
||||
// Warning: (151-159): Assertion checker does not yet support the type of this variable.
|
||||
// Warning: (188-191): Assertion checker does not yet implement type abi
|
||||
// Warning: (207-208): Assertion checker does not yet implement type type(struct C.S storage pointer)
|
||||
// Warning: (188-217): Assertion checker does not yet implement this type of function call.
|
||||
@@ -0,0 +1,20 @@
|
||||
pragma experimental SMTChecker;
|
||||
pragma experimental "ABIEncoderV2";
|
||||
|
||||
contract C {
|
||||
function f() public pure {
|
||||
(uint x1, bool b1) = abi.decode("abc", (uint, bool));
|
||||
(uint x2, bool b2) = abi.decode("abc", (uint, bool));
|
||||
// False positive until abi.* are implemented as uninterpreted functions.
|
||||
assert(x1 == x2);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (32-67): Experimental features are turned on. Do not use experimental features on live deployments.
|
||||
// Warning: (125-132): Unused local variable.
|
||||
// Warning: (183-190): Unused local variable.
|
||||
// Warning: (136-139): Assertion checker does not yet implement type abi
|
||||
// Warning: (136-167): Assertion checker does not yet implement this type of function call.
|
||||
// Warning: (194-197): Assertion checker does not yet implement type abi
|
||||
// Warning: (194-225): Assertion checker does not yet implement this type of function call.
|
||||
// Warning: (303-319): Assertion violation happens here
|
||||
@@ -0,0 +1,24 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
function f() public pure {
|
||||
(uint a1, bytes32 b1, C c1) = abi.decode("abc", (uint, bytes32, C));
|
||||
(uint a2, bytes32 b2, C c2) = abi.decode("abc", (uint, bytes32, C));
|
||||
// False positive until abi.* are implemented as uninterpreted functions.
|
||||
assert(a1 == a2);
|
||||
assert(a1 != a2);
|
||||
}
|
||||
|
||||
}
|
||||
// ----
|
||||
// Warning: (88-98): Unused local variable.
|
||||
// Warning: (100-104): Unused local variable.
|
||||
// Warning: (161-171): Unused local variable.
|
||||
// Warning: (173-177): Unused local variable.
|
||||
// Warning: (108-111): Assertion checker does not yet implement type abi
|
||||
// Warning: (142-143): Assertion checker does not yet implement type type(contract C)
|
||||
// Warning: (108-145): Assertion checker does not yet implement this type of function call.
|
||||
// Warning: (181-184): Assertion checker does not yet implement type abi
|
||||
// Warning: (215-216): Assertion checker does not yet implement type type(contract C)
|
||||
// Warning: (181-218): Assertion checker does not yet implement this type of function call.
|
||||
// Warning: (296-312): Assertion violation happens here
|
||||
// Warning: (315-331): Assertion violation happens here
|
||||
@@ -10,5 +10,6 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (132-133): Assertion checker does not yet implement type type(enum C.D)
|
||||
// Warning: (132-136): Type conversion is not yet fully supported and might yield false positives.
|
||||
// Warning: (140-160): Assertion violation happens here
|
||||
|
||||
@@ -20,3 +20,6 @@ contract C
|
||||
// ----
|
||||
// Warning: (224-240): Unused local variable.
|
||||
// Warning: (260-275): Assertion violation happens here
|
||||
// Warning: (279-293): Assertion violation happens here
|
||||
// Warning: (297-316): Assertion violation happens here
|
||||
// Warning: (320-344): Assertion violation happens here
|
||||
|
||||
@@ -20,3 +20,6 @@ contract C
|
||||
// ----
|
||||
// Warning: (224-240): Unused local variable.
|
||||
// Warning: (268-283): Assertion violation happens here
|
||||
// Warning: (287-301): Assertion violation happens here
|
||||
// Warning: (305-324): Assertion violation happens here
|
||||
// Warning: (328-352): Assertion violation happens here
|
||||
|
||||
@@ -20,3 +20,6 @@ contract C
|
||||
// ----
|
||||
// Warning: (224-240): Unused local variable.
|
||||
// Warning: (266-281): Assertion violation happens here
|
||||
// Warning: (285-299): Assertion violation happens here
|
||||
// Warning: (303-322): Assertion violation happens here
|
||||
// Warning: (326-350): Assertion violation happens here
|
||||
|
||||
@@ -17,8 +17,10 @@ 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 type struct C.S storage ref
|
||||
// Warning: (149-150): Assertion checker does not yet implement type type(struct C.S storage pointer)
|
||||
// Warning: (149-153): Assertion checker does not yet implement type struct C.S memory
|
||||
// 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-174): Assertion checker does not yet implement type type(struct C.S storage pointer)
|
||||
// Warning: (173-177): Assertion checker does not yet implement type struct C.S memory
|
||||
// Warning: (173-177): Assertion checker does not yet implement this expression.
|
||||
|
||||
@@ -15,9 +15,11 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// Warning: (112-120): Assertion checker does not yet support the type of this variable.
|
||||
// Warning: (137-138): Assertion checker does not yet implement type type(struct C.S storage pointer)
|
||||
// Warning: (137-141): Assertion checker does not yet implement type struct C.S memory
|
||||
// Warning: (137-141): Assertion checker does not yet implement this expression.
|
||||
// Warning: (193-203): Assertion checker does not yet support the type of this variable.
|
||||
// Warning: (137-138): Assertion checker does not yet implement type type(struct C.S storage pointer)
|
||||
// Warning: (137-141): Assertion checker does not yet implement type struct C.S memory
|
||||
// Warning: (137-141): Assertion checker does not yet implement this expression.
|
||||
// Warning: (227-228): Assertion checker does not yet implement type struct C.S memory
|
||||
|
||||
Reference in New Issue
Block a user