Skip to content

Commit e048ba4

Browse files
author
Leo
authored
Merge pull request #13439 from ethereum/z3_4_8_11_smt_tests
Update SMT tests with z3 4.11.0
2 parents 3658d8a + 22e4e2c commit e048ba4

36 files changed

+89
-65
lines changed

.circleci/config.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ version: 2.1
99
parameters:
1010
ubuntu-2004-docker-image:
1111
type: string
12-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-13
13-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:aa64242ecba4f040a839eadfaf20e8489cf93d1cb96ab90df2b240cdbbfe7f7c"
12+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-14
13+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:d1ef23849db4c5462b248d89c111da4009b153cbd5002cb8755b0580312be581"
1414
ubuntu-2004-clang-docker-image:
1515
type: string
16-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-13
17-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:caaf8d42aaf07397d1540e570f096a4fb1ef11fda7da3f1141d8852ec8322a9e"
16+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-14
17+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:beb8c91998ec0df99a488900b3723a06f1122f0954fc73786b6c53fd73a6408d"
1818
ubuntu-1604-clang-ossfuzz-docker-image:
1919
type: string
20-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-18
21-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:048002d71a1f86f83dedb79dd057760b752256c75646ba5ad5c1bbe92e1695aa"
20+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-19
21+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:8c9bf1813c261d781f4c65fceed2dfb3ecf5be9ecf49bddbd250b570a7f3baea"
2222
emscripten-docker-image:
2323
type: string
24-
# solbuildpackpusher/solidity-buildpack-deps:emscripten-12
25-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:65a82268792a5a2ee85ad432baf04a056c3a4006941ab3a4416eb1a0614883f3"
24+
# solbuildpackpusher/solidity-buildpack-deps:emscripten-13
25+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:f1c13f3450d1f2e53ea18ac1ac1a17e932573cb9a5ccd0fd9ef6dd44f6402fa9"
2626
evm-version:
2727
type: string
2828
default: london
@@ -1087,6 +1087,9 @@ jobs:
10871087
environment:
10881088
EVM: << pipeline.parameters.evm-version >>
10891089
OPTIMIZE: 0
1090+
# The high parallelism in this job is causing the SMT tests to run out of memory,
1091+
# so disabling for now.
1092+
SOLTEST_FLAGS: --no-smt
10901093
<<: *steps_soltest
10911094

10921095
t_ubu_release_soltest_all: &t_ubu_release_soltest_all

.circleci/osx_install_dependencies.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ then
6161
./scripts/install_obsolete_jsoncpp_1_7_4.sh
6262

6363
# z3
64-
z3_version="4.8.17"
64+
z3_version="4.11.0"
6565
z3_dir="z3-${z3_version}-x64-osx-10.16"
6666
z3_package="${z3_dir}.zip"
6767
wget "https://github.com/Z3Prover/z3/releases/download/z3-${z3_version}/${z3_package}"
68-
validate_checksum "$z3_package" 189667930517aee07f1ce36485d5924a9a2cb4f8c3c9586b03e714a2c657541a
68+
validate_checksum "$z3_package" b6a4a6d587e4bfb0643db81129f0f447692fae13d4bd1bd4d93f1c0301b75ffc
6969
unzip "$z3_package"
7070
rm "$z3_package"
7171
cp "${z3_dir}/bin/libz3.a" /usr/local/lib

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/license.h.in" include/licens
6969

7070
include(EthOptions)
7171
configure_project(TESTS)
72-
set(LATEST_Z3_VERSION "4.8.17")
72+
set(LATEST_Z3_VERSION "4.11.0")
7373
set(MINIMUM_Z3_VERSION "4.8.0")
7474
find_package(Z3)
7575
if (${Z3_FOUND})

scripts/build_emscripten.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ else
3434
BUILD_DIR="$1"
3535
fi
3636

37-
# solbuildpackpusher/solidity-buildpack-deps:emscripten-12
37+
# solbuildpackpusher/solidity-buildpack-deps:emscripten-13
3838
docker run -v "$(pwd):/root/project" -w /root/project \
39-
solbuildpackpusher/solidity-buildpack-deps@sha256:65a82268792a5a2ee85ad432baf04a056c3a4006941ab3a4416eb1a0614883f3 \
39+
solbuildpackpusher/solidity-buildpack-deps@sha256:f1c13f3450d1f2e53ea18ac1ac1a17e932573cb9a5ccd0fd9ef6dd44f6402fa9 \
4040
./scripts/ci/build_emscripten.sh "$BUILD_DIR"

test/libsolidity/smtCheckerTests/abi/abi_encode_packed_hash.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ contract C {
1111
}
1212
// ====
1313
// SMTEngine: all
14+
// SMTIgnoreOS: macos
1415
// ----
15-
// Warning 1218: (281-319): CHC: Error trying to invoke SMT solver.
16-
// Warning 6328: (281-319): CHC: Assertion violation might happen here.
17-
// Warning 4661: (281-319): BMC: Assertion violation happens here.
16+
// Warning 6328: (281-319): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0\nb = 0\n\nTransaction trace:\nC.constructor()\nC.abiencodePackedHash(0, 0)

test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_hash.sol

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ contract C {
1313
}
1414
// ====
1515
// SMTEngine: all
16+
// SMTIgnoreCex: yes
1617
// ----
1718
// Warning 2072: (161-176): Unused local variable.
18-
// Warning 1218: (379-417): CHC: Error trying to invoke SMT solver.
19-
// Warning 1218: (436-474): CHC: Error trying to invoke SMT solver.
20-
// Warning 6328: (379-417): CHC: Assertion violation might happen here.
21-
// Warning 6328: (436-474): CHC: Assertion violation might happen here.
22-
// Warning 4661: (379-417): BMC: Assertion violation happens here.
23-
// Warning 4661: (436-474): BMC: Assertion violation happens here.
19+
// Warning 6328: (379-417): CHC: Assertion violation happens here.
20+
// Warning 6328: (436-474): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_vs_sig.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ contract C {
99
// ====
1010
// SMTEngine: all
1111
// ----
12+
// Warning 1218: (294-324): CHC: Error trying to invoke SMT solver.
1213
// Warning 6328: (294-324): CHC: Assertion violation might happen here.
1314
// Warning 7812: (294-324): BMC: Assertion violation might happen here.

test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_hash.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ contract C {
1313
// ====
1414
// SMTEngine: all
1515
// ----
16-
// Warning 1218: (394-432): CHC: Error trying to invoke SMT solver.
1716
// Warning 6328: (337-375): CHC: Assertion violation happens here.
18-
// Warning 6328: (394-432): CHC: Assertion violation might happen here.
19-
// Warning 4661: (394-432): BMC: Assertion violation happens here.
17+
// Warning 6328: (394-432): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_simple.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ contract C {
2525
// ----
2626
// Warning 5667: (107-122): Unused function parameter. Remove or comment out the variable name to silence this warning.
2727
// Warning 1218: (824-854): CHC: Error trying to invoke SMT solver.
28-
// Warning 6328: (543-573): CHC: Assertion violation happens here.
28+
// Warning 6328: (543-573): CHC: Assertion violation happens here.\nCounterexample:\n\nt = false\nx = 0\ny = 0\nz = 0\nb5 = []\nb6 = []\n\nTransaction trace:\nC.constructor()\nC.abiEncodeSimple(sig, false, 0, 0, 0, a, b)
2929
// Warning 6328: (664-694): CHC: Assertion violation happens here.
3030
// Warning 6328: (713-743): CHC: Assertion violation happens here.
3131
// Warning 6328: (824-854): CHC: Assertion violation might happen here.

test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_bytes.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ contract C {
1212
}
1313
// ====
1414
// SMTEngine: all
15+
// SMTIgnoreOS: macos
1516
// ----
16-
// Warning 6328: (203-244): CHC: Assertion violation happens here.
17+
// Warning 6328: (203-244): CHC: Assertion violation happens here.\nCounterexample:\nb = [0x0, 0x0]\nlength = 2\n\nTransaction trace:\nC.constructor()\nState: b = []\nC.f()

0 commit comments

Comments
 (0)