Skip to content

Commit 3e3065a

Browse files
authored
Merge pull request #9126 from ethereum/develop
Merge develop into release for 0.6.9
2 parents 0bbfe45 + 92a9f44 commit 3e3065a

File tree

469 files changed

+7731
-3000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+7731
-3000
lines changed

.circleci/config.yml

+55-16
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ parameters:
1212
default: "4"
1313
ubuntu-2004-docker-image-rev:
1414
type: string
15-
default: "1"
15+
default: "2"
1616
ubuntu-2004-clang-docker-image-rev:
1717
type: string
18-
default: "1"
18+
default: "2"
1919
ubuntu-1604-clang-ossfuzz-docker-image-rev:
2020
type: string
2121
default: "2"
@@ -173,6 +173,18 @@ defaults:
173173
- store_test_results: *store_test_results
174174
- store_artifacts: *artifacts_test_results
175175

176+
- test_asan_clang: &test_asan_clang
177+
<<: *test_ubuntu2004_clang
178+
steps:
179+
- checkout
180+
- attach_workspace:
181+
at: build
182+
- run:
183+
<<: *run_soltest
184+
no_output_timeout: 30m
185+
- store_test_results: *store_test_results
186+
- store_artifacts: *artifacts_test_results
187+
176188
# --------------------------------------------------------------------------
177189
# Workflow Templates
178190

@@ -216,6 +228,11 @@ defaults:
216228
requires:
217229
- b_ubu_asan
218230

231+
- workflow_ubuntu2004_asan_clang: &workflow_ubuntu2004_asan_clang
232+
<<: *workflow_trigger_on_tags
233+
requires:
234+
- b_ubu_asan_clang
235+
219236
- workflow_emscripten: &workflow_emscripten
220237
<<: *workflow_trigger_on_tags
221238
requires:
@@ -299,6 +316,15 @@ jobs:
299316
name: checking shell scripts
300317
command: ./scripts/chk_shellscripts/chk_shellscripts.sh
301318

319+
chk_errorcodes:
320+
docker:
321+
- image: circleci/python:3.6
322+
steps:
323+
- checkout
324+
- run:
325+
name: Check for error codes
326+
command: ./scripts/fix_error_ids.py --check-only
327+
302328
chk_pylint:
303329
docker:
304330
- image: buildpack-deps:eoan
@@ -380,6 +406,20 @@ jobs:
380406
- store_artifacts: *artifacts_solc
381407
- persist_to_workspace: *artifacts_executables
382408

409+
410+
b_ubu_asan_clang: &build_ubuntu2004_clang
411+
docker:
412+
- image: ethereum/solidity-buildpack-deps:ubuntu2004-clang-<< pipeline.parameters.ubuntu-2004-clang-docker-image-rev >>
413+
environment:
414+
CC: clang
415+
CXX: clang++
416+
CMAKE_OPTIONS: -DSANITIZE=address
417+
steps:
418+
- checkout
419+
- run: *run_build
420+
- store_artifacts: *artifacts_solc
421+
- persist_to_workspace: *artifacts_executables
422+
383423
b_ubu: &build_ubuntu2004
384424
docker:
385425
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
@@ -500,7 +540,7 @@ jobs:
500540
xcode: "11.0.0"
501541
environment:
502542
TERM: xterm
503-
CMAKE_BUILD_TYPE: Debug
543+
CMAKE_BUILD_TYPE: Release
504544
steps:
505545
- checkout
506546
- restore_cache:
@@ -558,27 +598,15 @@ jobs:
558598

559599
b_ems:
560600
docker:
561-
- image: trzeci/emscripten:sdk-tag-1.39.3-64bit
601+
- image: ethereum/solidity-buildpack-deps:emsdk-1.39.15-2
562602
environment:
563603
TERM: xterm
564604
steps:
565605
- checkout
566-
- restore_cache:
567-
name: Restore Boost build
568-
key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/build_emscripten.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }}
569-
- run:
570-
name: Bootstrap Boost
571-
command: |
572-
scripts/travis-emscripten/install_deps.sh
573606
- run:
574607
name: Build
575608
command: |
576609
scripts/travis-emscripten/build_emscripten.sh
577-
- save_cache:
578-
name: Save Boost build
579-
key: *boost-cache-key
580-
paths:
581-
- boost_1_70_0_install
582610
- store_artifacts:
583611
path: emscripten_build/libsolc/soljson.js
584612
destination: soljson.js
@@ -684,6 +712,14 @@ jobs:
684712
SOLTEST_FLAGS: --no-smt
685713
ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2
686714

715+
t_ubu_asan_constantinople_clang:
716+
<<: *test_asan_clang
717+
environment:
718+
EVM: constantinople
719+
OPTIMIZE: 0
720+
SOLTEST_FLAGS: --no-smt
721+
ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2
722+
687723
t_ems_solcjs:
688724
docker:
689725
- image: buildpack-deps:latest
@@ -818,6 +854,7 @@ workflows:
818854
- chk_buglist: *workflow_trigger_on_tags
819855
- chk_proofs: *workflow_trigger_on_tags
820856
- chk_pylint: *workflow_trigger_on_tags
857+
- chk_errorcodes: *workflow_trigger_on_tags
821858
- chk_antlr_grammar: *workflow_trigger_on_tags
822859
- chk_docs_pragma_min_version: *workflow_trigger_on_tags
823860

@@ -848,7 +885,9 @@ workflows:
848885

849886
# ASan build and tests
850887
- b_ubu_asan: *workflow_trigger_on_tags
888+
- b_ubu_asan_clang: *workflow_trigger_on_tags
851889
- t_ubu_asan_constantinople: *workflow_ubuntu2004_asan
890+
- t_ubu_asan_constantinople_clang: *workflow_ubuntu2004_asan_clang
852891
- t_ubu_asan_cli: *workflow_ubuntu2004_asan
853892

854893
# Emscripten build and selected tests
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# vim:syntax=dockerfile
2+
#------------------------------------------------------------------------------
3+
# Dockerfile for building and testing Solidity Compiler on CI
4+
# Target: Emscripten
5+
# URL: https://hub.docker.com/r/ethereum/solidity-buildpack-deps
6+
#
7+
# This file is part of solidity.
8+
#
9+
# solidity is free software: you can redistribute it and/or modify
10+
# it under the terms of the GNU General Public License as published by
11+
# the Free Software Foundation, either version 3 of the License, or
12+
# (at your option) any later version.
13+
#
14+
# solidity is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with solidity. If not, see <http://www.gnu.org/licenses/>
21+
#
22+
# (c) 2016-2019 solidity contributors.
23+
#------------------------------------------------------------------------------
24+
#
25+
# The Emscripten SDK at https://github.com/emscripten-core/emsdk/
26+
# contains a Makefile in the docker/ subdirectory that can be used to create the
27+
# required base image using:
28+
#
29+
# make version=1.39.15 build
30+
#
31+
FROM emscripten/emsdk:1.39.15 AS base
32+
33+
ADD emscripten.jam /usr/src
34+
RUN set -ex; \
35+
cd /usr/src; \
36+
git clone https://github.com/Z3Prover/z3.git -b z3-4.8.8 --depth 1 ; \
37+
cd z3; \
38+
mkdir build; \
39+
cd build; \
40+
emcmake cmake \
41+
-DCMAKE_BUILD_TYPE=MinSizeRel \
42+
-DCMAKE_INSTALL_PREFIX=/emsdk/emscripten/sdk/system/ \
43+
-DZ3_BUILD_LIBZ3_SHARED=OFF \
44+
-DZ3_ENABLE_EXAMPLE_TARGETS=OFF \
45+
-DZ3_BUILD_TEST_EXECUTABLES=OFF \
46+
-DZ3_BUILD_EXECUTABLE=OFF \
47+
-DZ3_SINGLE_THREADED=ON \
48+
-DCMAKE_CXX_FLAGS="-s DISABLE_EXCEPTION_CATCHING=0" \
49+
..; \
50+
make; make install; \
51+
rm -r /usr/src/z3; \
52+
cd /usr/src; \
53+
wget -q 'https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2' -O boost.tar.bz2; \
54+
test "$(sha256sum boost.tar.bz2)" = "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 boost.tar.bz2"; \
55+
tar -xf boost.tar.bz2; \
56+
rm boost.tar.bz2; \
57+
cd boost_1_73_0; \
58+
mv ../emscripten.jam .; \
59+
./bootstrap.sh; \
60+
echo "using emscripten : : em++ ;" >> project-config.jam ; \
61+
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \
62+
--with-system --with-filesystem --with-test --with-program_options \
63+
cxxflags="-s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-local-typedef -Wno-variadic-macros -Wno-c99-extensions -Wno-all" \
64+
--prefix=/emsdk/emscripten/sdk/system install; \
65+
rm -r /usr/src/boost_1_73_0

.circleci/docker/Dockerfile.ubuntu2004

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ FROM buildpack-deps:focal AS base
2626
ARG DEBIAN_FRONTEND=noninteractive
2727

2828
RUN set -ex; \
29+
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
30+
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
31+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
2932
apt-get update; \
3033
apt-get install -qqy --no-install-recommends \
3134
build-essential \
3235
software-properties-common \
3336
cmake ninja-build \
3437
libboost-filesystem-dev libboost-test-dev libboost-system-dev \
3538
libboost-program-options-dev \
36-
libcvc4-dev z3 libz3-dev \
39+
libcvc4-dev libz3-static-dev \
3740
; \
3841
apt-get install -qy python3-pip python3-sphinx; \
3942
pip3 install codecov; \

.circleci/docker/Dockerfile.ubuntu2004.clang

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ FROM buildpack-deps:focal AS base
2626
ARG DEBIAN_FRONTEND=noninteractive
2727

2828
RUN set -ex; \
29+
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
30+
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
31+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
2932
apt-get update; \
3033
apt-get install -qqy --no-install-recommends \
3134
build-essential \
3235
software-properties-common \
3336
cmake ninja-build \
3437
libboost-filesystem-dev libboost-test-dev libboost-system-dev \
3538
libboost-program-options-dev \
36-
clang llvm-dev \
37-
z3 libz3-dev \
39+
clang \
40+
libz3-static-dev \
3841
; \
3942
rm -rf /var/lib/apt/lists/*
4043

scripts/travis-emscripten/emscripten.jam renamed to .circleci/docker/emscripten.jam

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ rule init ( version ? : command * : options * )
7979
# @todo this seems to be the right way, but this is a list somehow
8080
toolset.add-requirements <toolset>emscripten:<testing.launcher>node ;
8181

82-
toolset.flags emscripten.compile STDHDRS $(condition) : /emsdk_portable/emscripten/sdk/system/include ;
83-
toolset.flags emscripten.link STDLIBPATH $(condition) : /emsdk_portable/emscripten/sdk/system/lib ;
84-
toolset.flags emscripten AR $(condition) : /emsdk_portable/emscripten/sdk/emar ;
85-
toolset.flags emscripten RANLIB $(condition) : /emsdk_portable/emscripten/sdk/emranlib ;
82+
toolset.flags emscripten.compile STDHDRS $(condition) : /emsdk/emscripten/sdk/system/include ;
83+
toolset.flags emscripten.link STDLIBPATH $(condition) : /emsdk/emscripten/sdk/system/lib ;
84+
toolset.flags emscripten AR $(condition) : /emsdk/emscripten/sdk/emar ;
85+
toolset.flags emscripten RANLIB $(condition) : /emsdk/emscripten/sdk/emranlib ;
8686
}
8787

8888
type.set-generated-target-suffix EXE : <toolset>emscripten : js ;

.circleci/osx_install_dependencies.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ then
4343
./scripts/install_obsolete_jsoncpp_1_7_4.sh
4444

4545
# z3
46-
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.7/z3-4.8.7-x64-osx-10.14.6.zip
47-
unzip z3-4.8.7-x64-osx-10.14.6.zip
48-
rm -f z3-4.8.7-x64-osx-10.14.6.zip
49-
cp z3-4.8.7-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
50-
cp z3-4.8.7-x64-osx-10.14.6/bin/z3 /usr/local/bin
51-
cp z3-4.8.7-x64-osx-10.14.6/include/* /usr/local/include
52-
rm -rf z3-4.8.7-x64-osx-10.14.6
46+
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.8/z3-4.8.8-x64-osx-10.14.6.zip
47+
unzip z3-4.8.8-x64-osx-10.14.6.zip
48+
rm -f z3-4.8.8-x64-osx-10.14.6.zip
49+
cp z3-4.8.8-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
50+
cp z3-4.8.8-x64-osx-10.14.6/bin/z3 /usr/local/bin
51+
cp z3-4.8.8-x64-osx-10.14.6/include/* /usr/local/include
52+
rm -rf z3-4.8.8-x64-osx-10.14.6
5353

5454
# evmone
5555
wget https://github.com/ethereum/evmone/releases/download/v0.4.0/evmone-0.4.0-darwin-x86_64.tar.gz

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ matrix:
110110
before_install:
111111
- nvm install 8
112112
- nvm use 8
113-
- docker pull trzeci/emscripten:sdk-tag-1.39.3-64bit
113+
- docker pull ethereum/solidity-buildpack-deps:emsdk-1.39.15-1
114114
env:
115115
- SOLC_EMSCRIPTEN=On
116116
- SOLC_INSTALL_DEPS_TRAVIS=Off

CMakeLists.txt

+19-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include(EthPolicy)
1010
eth_policy()
1111

1212
# project name and version should be set after cmake_policy CMP0048
13-
set(PROJECT_VERSION "0.6.8")
13+
set(PROJECT_VERSION "0.6.9")
1414
# OSX target needed in order to support std::visit
1515
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
1616
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)
@@ -51,8 +51,26 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/license.h.in" include/licens
5151
include(EthOptions)
5252
configure_project(TESTS)
5353

54+
find_package(Z3 4.6.0)
55+
if (${Z3_FOUND})
56+
add_definitions(-DHAVE_Z3)
57+
message("Z3 SMT solver found. This enables optional SMT checking with Z3.")
58+
endif()
59+
60+
find_package(CVC4 QUIET)
61+
if (${CVC4_FOUND})
62+
add_definitions(-DHAVE_CVC4)
63+
message("CVC4 SMT solver found. This enables optional SMT checking with CVC4.")
64+
endif()
65+
66+
if (NOT (${Z3_FOUND} OR ${CVC4_FOUND}))
67+
message("No SMT solver found (or it has been forcefully disabled). Optional SMT checking will not be available.\
68+
\nPlease install Z3 or CVC4 or remove the option disabling them (USE_Z3, USE_CVC4).")
69+
endif()
70+
5471
add_subdirectory(libsolutil)
5572
add_subdirectory(liblangutil)
73+
add_subdirectory(libsmtutil)
5674
add_subdirectory(libevmasm)
5775
add_subdirectory(libyul)
5876
add_subdirectory(libsolidity)

Changelog.md

+37
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
### 0.6.9 (2020-06-04)
2+
3+
Language Features:
4+
* Permit calldata location for all variables.
5+
* NatSpec: Support NatSpec comments on state variables.
6+
* Yul: EVM instruction `pc()` is marked deprecated and will be removed in the next breaking release.
7+
8+
9+
Compiler Features:
10+
* Build system: Update the soljson.js build to emscripten 1.39.15 and boost 1.73.0 and include Z3 for integrated SMTChecker support without the callback mechanism.
11+
* Build system: Switch the emscripten build from the fastcomp backend to the upstream backend.
12+
* Code Generator: Do not introduce new internal source references for small compiler routines.
13+
* Commandline Interface: Adds new option ``--base-path PATH`` to use the given path as the root of the source tree (defaults to the root of the filesystem).
14+
* SMTChecker: Support array ``length``.
15+
* SMTChecker: Support array ``push`` and ``pop``.
16+
* SMTChecker: General support to BitVectors and the bitwise ``and`` operator.
17+
18+
19+
Bugfixes:
20+
* Code Generator: Trigger proper unimplemented errors on certain array copy operations.
21+
* Commandline Interface: Fix internal error when using ``--assemble`` or ``--yul`` options with ``--machine ewasm`` but without specifying ``--yul-dialect``.
22+
* NatSpec: DocString block is terminated when encountering an empty line.
23+
* Optimizer: Fixed a bug in BlockDeDuplicator.
24+
* Scanner: Fix bug when two empty NatSpec comments lead to scanning past EOL.
25+
* SMTChecker: Fix internal error on try/catch clauses with parameters.
26+
* SMTChecker: Fix internal error when applying arithmetic operators to fixed point variables.
27+
* SMTChecker: Fix internal error when assigning to index access inside branches.
28+
* SMTChecker: Fix internal error when short circuiting Boolean expressions with function calls in state variable initialization.
29+
* Type Checker: Disallow assignments to storage variables of type ``mapping``.
30+
* Type Checker: Disallow inline arrays of non-nameable types.
31+
* Type Checker: Disallow usage of override with non-public state variables.
32+
* Type Checker: Fix internal compiler error when accessing members of array slices.
33+
* Type Checker: Fix internal compiler error when forward referencing non-literal constants from inline assembly.
34+
* Type Checker: Fix internal compiler error when trying to decode too large static arrays.
35+
* Type Checker: Fix wrong compiler error when referencing an overridden function without calling it.
36+
37+
138
### 0.6.8 (2020-05-14)
239

340
Important Bugfixes:

0 commit comments

Comments
 (0)