From de34fe8aa38e2b75ba8a3767593785ae117a2ade Mon Sep 17 00:00:00 2001 From: Martin Blicha Date: Wed, 9 Dec 2020 09:13:39 +0100 Subject: [PATCH] [SMTChecker] Adding test witnessing that SMTChecker no longer crashes when producing CEX with arrays --- .../overflow/overflow_mul_cex_with_array.sol | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/libsolidity/smtCheckerTests/overflow/overflow_mul_cex_with_array.sol diff --git a/test/libsolidity/smtCheckerTests/overflow/overflow_mul_cex_with_array.sol b/test/libsolidity/smtCheckerTests/overflow/overflow_mul_cex_with_array.sol new file mode 100644 index 000000000..24119ade2 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/overflow/overflow_mul_cex_with_array.sol @@ -0,0 +1,10 @@ +pragma experimental SMTChecker; + +contract C { + function f(bytes calldata x, uint y) external pure { + x[8][0]; + x[8][5*y]; + } +} +// ---- +// Warning 4984: (118-121): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.