mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge branch 'develop' into develop_060
This commit is contained in:
commit
8148619d5b
@ -431,12 +431,12 @@ jobs:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
|
||||
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
|
||||
- run:
|
||||
name: Install build dependencies
|
||||
command: ./.circleci/osx_install_dependencies.sh
|
||||
- save_cache:
|
||||
key: dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
|
||||
key: dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
|
||||
paths:
|
||||
- /usr/local/bin
|
||||
- /usr/local/sbin
|
||||
@ -459,7 +459,7 @@ jobs:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
|
||||
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
|
||||
- attach_workspace:
|
||||
at: build
|
||||
- run: *run_soltest
|
||||
@ -475,7 +475,7 @@ jobs:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
|
||||
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
|
||||
- attach_workspace:
|
||||
at: build
|
||||
- run: *run_cmdline_tests
|
||||
|
@ -62,7 +62,7 @@ RUN git clone --recursive -b boost-1.69.0 https://github.com/boostorg/boost.git
|
||||
rm -rf /usr/src/boost
|
||||
|
||||
# Z3
|
||||
RUN git clone --depth 1 -b Z3-4.8.5 https://github.com/Z3Prover/z3.git \
|
||||
RUN git clone --depth 1 -b z3-4.8.6 https://github.com/Z3Prover/z3.git \
|
||||
/usr/src/z3; \
|
||||
cd /usr/src/z3; \
|
||||
python scripts/mk_make.py --prefix=/usr ; \
|
||||
|
@ -43,13 +43,13 @@ then
|
||||
./scripts/install_obsolete_jsoncpp_1_7_4.sh
|
||||
|
||||
# z3
|
||||
wget https://github.com/Z3Prover/z3/releases/download/Z3-4.8.5/z3-4.8.5-x64-osx-10.14.2.zip
|
||||
unzip z3-4.8.5-x64-osx-10.14.2.zip
|
||||
rm -f z3-4.8.5-x64-osx-10.14.2.zip
|
||||
cp z3-4.8.5-x64-osx-10.14.2/bin/libz3.a /usr/local/lib
|
||||
cp z3-4.8.5-x64-osx-10.14.2/bin/z3 /usr/local/bin
|
||||
cp z3-4.8.5-x64-osx-10.14.2/include/* /usr/local/include
|
||||
rm -rf z3-4.8.5-x64-osx-10.14.2
|
||||
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.6/z3-4.8.6-x64-osx-10.14.6.zip
|
||||
unzip z3-4.8.6-x64-osx-10.14.6.zip
|
||||
rm -f z3-4.8.6-x64-osx-10.14.6.zip
|
||||
cp z3-4.8.6-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
|
||||
cp z3-4.8.6-x64-osx-10.14.6/bin/z3 /usr/local/bin
|
||||
cp z3-4.8.6-x64-osx-10.14.6/include/* /usr/local/include
|
||||
rm -rf z3-4.8.6-x64-osx-10.14.6
|
||||
|
||||
# evmone
|
||||
wget https://github.com/ethereum/evmone/releases/download/v0.1.0/evmone-0.1.0-darwin-x86_64.tar.gz
|
||||
|
@ -17,7 +17,7 @@ fi
|
||||
|
||||
FORMATERROR=$(
|
||||
(
|
||||
git grep -nIE "\<(if|for)\(" -- '*.h' '*.cpp' # no space after "if" or "for"
|
||||
git grep -nIE "\<(if|for|while|switch)\(" -- '*.h' '*.cpp' # no space after "if", "for", "while" or "switch"
|
||||
git grep -nIE "\<for\>\s*\([^=]*\>\s:\s.*\)" -- '*.h' '*.cpp' # no space before range based for-loop
|
||||
git grep -nIE "\<if\>\s*\(.*\)\s*\{\s*$" -- '*.h' '*.cpp' # "{\n" on same line as "if" / "for"
|
||||
git grep -nIE "[,\(<]\s*const " -- '*.h' '*.cpp' # const on left side of type
|
||||
|
@ -25,9 +25,9 @@ set -ev
|
||||
keyid=70D110489D66E2F6
|
||||
email=builds@ethereum.org
|
||||
packagename=libz3-static-dev
|
||||
version=4.8.5
|
||||
version=4.8.6
|
||||
|
||||
DISTRIBUTIONS="bionic disco"
|
||||
DISTRIBUTIONS="bionic disco eoan"
|
||||
|
||||
for distribution in $DISTRIBUTIONS
|
||||
do
|
||||
@ -40,7 +40,7 @@ pparepo=cpp-build-deps
|
||||
ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/${pparepo}/+files
|
||||
|
||||
# Fetch source
|
||||
git clone --depth 1 --branch Z3-${version} https://github.com/Z3Prover/z3.git
|
||||
git clone --depth 1 --branch z3-${version} https://github.com/Z3Prover/z3.git
|
||||
cd z3
|
||||
debversion="$version"
|
||||
|
||||
|
@ -57,7 +57,7 @@ packagename=solc
|
||||
|
||||
static_build_distribution=disco
|
||||
|
||||
DISTRIBUTIONS="bionic disco"
|
||||
DISTRIBUTIONS="bionic disco eoan"
|
||||
|
||||
if is_release
|
||||
then
|
||||
|
@ -7,10 +7,11 @@ contract Simple {
|
||||
for (i = 0; i < n; ++i)
|
||||
a[i] = i;
|
||||
require(n > 1);
|
||||
// Assertion is safe but current solver version cannot solve it.
|
||||
// Assertion is safe but current solver version times out.
|
||||
// Keep test for next solver release.
|
||||
assert(a[n-1] > a[n-2]);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (267-290): Assertion violation happens here
|
||||
// Warning: (261-284): Error trying to invoke SMT solver.
|
||||
// Warning: (261-284): Assertion violation happens here
|
||||
|
@ -1,23 +0,0 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract LoopFor2 {
|
||||
uint[] b;
|
||||
uint[] c;
|
||||
|
||||
function testUnboundedForLoop(uint n) public {
|
||||
b[0] = 900;
|
||||
uint[] memory a = b;
|
||||
require(n > 0 && n < 100);
|
||||
uint i;
|
||||
while (i < n) {
|
||||
b[i] = i + 1;
|
||||
c[i] = b[i];
|
||||
++i;
|
||||
}
|
||||
assert(b[0] == c[0]);
|
||||
assert(a[0] == 900);
|
||||
assert(b[0] == 900);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (312-331): Assertion violation happens here
|
@ -14,11 +14,13 @@ contract LoopFor2 {
|
||||
c[i] = b[i];
|
||||
++i;
|
||||
}
|
||||
// Fails as false positive.
|
||||
assert(b[0] == c[0]);
|
||||
assert(a[0] == 900);
|
||||
assert(b[0] == 900);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (290-309): Assertion violation happens here
|
||||
// Warning: (313-332): Assertion violation happens here
|
||||
// Warning: (296-316): Assertion violation happens here
|
||||
// Warning: (320-339): Assertion violation happens here
|
||||
// Warning: (343-362): Assertion violation happens here
|
||||
|
Loading…
Reference in New Issue
Block a user