Skip to content

Commit 1dca32f

Browse files
authored
Merge pull request #8468 from ethereum/develop
Merge develop into release for 0.6.4
2 parents 8dda952 + 5fd5465 commit 1dca32f

File tree

266 files changed

+5036
-1124
lines changed

Some content is hidden

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

266 files changed

+5036
-1124
lines changed

.circleci/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ docker build -t ethereum/solidity-buildpack-deps:ubuntu1904-<revision> -f Docker
1111
docker push ethereum/solidity-buildpack-deps:ubuntu1904-<revision>
1212
```
1313

14-
The current revision is stored in a [circle ci pipeline parameter](https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/pipeline-parameters.md#pipeline-parameters) called `docker-image-rev`. Please update the value assigned to this parameter at the time of a docker image update. Please verify that the value assigned to the parameter matches the revision part of the docker image tag (`<revision>` in the docker build/push snippet shown above). Otherwise, the docker image used by circle ci and the one actually pushed to docker hub will differ.
14+
The current revisions per docker image are stored in [circle ci pipeline parameters](https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/pipeline-parameters.md#pipeline-parameters) called `<image-desc>-docker-image-rev` (e.g., `ubuntu-1904-docker-image-rev`). Please update the value assigned to the parameter(s) corresponding to the docker image(s) being updated at the time of the update. Please verify that the value assigned to the parameter matches the revision part of the docker image tag (`<revision>` in the docker build/push snippet shown above). Otherwise, the docker image used by circle ci and the one actually pushed to docker hub will differ.
1515

1616
Once the docker image has been built and pushed to Dockerhub, you can find it at:
1717

.circleci/config.yml

+40-14
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@
77
# - ems: Emscripten
88
version: 2.1
99
parameters:
10-
docker-image-rev:
10+
ubuntu-1804-docker-image-rev:
1111
type: string
1212
default: "4"
13+
ubuntu-1904-docker-image-rev:
14+
type: string
15+
default: "4"
16+
ubuntu-1904-clang-docker-image-rev:
17+
type: string
18+
default: "5"
19+
ubuntu-1604-clang-ossfuzz-docker-image-rev:
20+
type: string
21+
default: "2"
1322

1423
defaults:
1524

@@ -113,9 +122,20 @@ defaults:
113122
name: command line tests
114123
command: ./test/cmdlineTests.sh
115124

125+
- test_ubuntu1604_clang: &test_ubuntu1604_clang
126+
docker:
127+
- image: ethereum/solidity-buildpack-deps:ubuntu1604-clang-ossfuzz-<< pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image-rev >>
128+
steps:
129+
- checkout
130+
- attach_workspace:
131+
at: build
132+
- run: *run_soltest
133+
- store_test_results: *store_test_results
134+
- store_artifacts: *artifacts_test_results
135+
116136
- test_ubuntu1904_clang: &test_ubuntu1904_clang
117137
docker:
118-
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-<< pipeline.parameters.docker-image-rev >>
138+
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-<< pipeline.parameters.ubuntu-1904-clang-docker-image-rev >>
119139
steps:
120140
- checkout
121141
- attach_workspace:
@@ -126,7 +146,7 @@ defaults:
126146

127147
- test_ubuntu1904: &test_ubuntu1904
128148
docker:
129-
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
149+
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.ubuntu-1904-docker-image-rev >>
130150
steps:
131151
- checkout
132152
- attach_workspace:
@@ -160,6 +180,11 @@ defaults:
160180
requires:
161181
- b_ubu
162182

183+
- workflow_ubuntu1604_clang: &workflow_ubuntu1604_clang
184+
<<: *workflow_trigger_on_tags
185+
requires:
186+
- b_ubu_ossfuzz
187+
163188
- workflow_ubuntu1904_clang: &workflow_ubuntu1904_clang
164189
<<: *workflow_trigger_on_tags
165190
requires:
@@ -190,7 +215,7 @@ defaults:
190215
requires:
191216
- b_ems
192217

193-
- workflow_ubuntu1904_ossfuzz: &workflow_ubuntu1904_ossfuzz
218+
- workflow_ubuntu1604_ossfuzz: &workflow_ubuntu1604_ossfuzz
194219
<<: *workflow_trigger_on_tags
195220
requires:
196221
- b_ubu_ossfuzz
@@ -312,7 +337,7 @@ jobs:
312337

313338
b_ubu_clang: &build_ubuntu1904_clang
314339
docker:
315-
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-<< pipeline.parameters.docker-image-rev >>
340+
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-<< pipeline.parameters.ubuntu-1904-clang-docker-image-rev >>
316341
environment:
317342
CC: clang
318343
CXX: clang++
@@ -324,7 +349,7 @@ jobs:
324349

325350
b_ubu: &build_ubuntu1904
326351
docker:
327-
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
352+
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.ubuntu-1904-docker-image-rev >>
328353
steps:
329354
- checkout
330355
- run: *run_build
@@ -339,7 +364,7 @@ jobs:
339364

340365
b_ubu18: &build_ubuntu1804
341366
docker:
342-
- image: ethereum/solidity-buildpack-deps:ubuntu1804-<< pipeline.parameters.docker-image-rev >>
367+
- image: ethereum/solidity-buildpack-deps:ubuntu1804-<< pipeline.parameters.ubuntu-1804-docker-image-rev >>
343368
environment:
344369
CMAKE_OPTIONS: -DCMAKE_CXX_FLAGS=-O2
345370
CMAKE_BUILD_TYPE: RelWithDebugInfo
@@ -391,12 +416,13 @@ jobs:
391416
- checkout
392417
- run: *run_build
393418

394-
b_ubu_ossfuzz:
395-
<<: *build_ubuntu1904_clang
419+
b_ubu_ossfuzz: &build_ubuntu1604_clang
420+
docker:
421+
- image: ethereum/solidity-buildpack-deps:ubuntu1604-clang-ossfuzz-<< pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image-rev >>
396422
environment:
397-
TERM: xterm
398423
CC: clang
399424
CXX: clang++
425+
TERM: xterm
400426
CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/libfuzzer.cmake
401427
steps:
402428
- checkout
@@ -405,7 +431,7 @@ jobs:
405431
- persist_to_workspace: *artifacts_executables_ossfuzz
406432

407433
t_ubu_ossfuzz: &t_ubu_ossfuzz
408-
<<: *test_ubuntu1904_clang
434+
<<: *test_ubuntu1604_clang
409435
steps:
410436
- checkout
411437
- attach_workspace:
@@ -546,7 +572,7 @@ jobs:
546572

547573
b_docs:
548574
docker:
549-
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
575+
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.ubuntu-1904-docker-image-rev >>
550576
steps:
551577
- checkout
552578
- run: *setup_prerelease_commit_hash
@@ -571,7 +597,7 @@ jobs:
571597

572598
t_ubu_cli: &t_ubu_cli
573599
docker:
574-
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
600+
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.ubuntu-1904-docker-image-rev >>
575601
environment:
576602
TERM: xterm
577603
steps:
@@ -793,7 +819,7 @@ workflows:
793819
jobs:
794820
# OSSFUZZ builds and (regression) tests
795821
- b_ubu_ossfuzz: *workflow_trigger_on_tags
796-
- t_ubu_ossfuzz: *workflow_ubuntu1904_ossfuzz
822+
- t_ubu_ossfuzz: *workflow_ubuntu1604_ossfuzz
797823

798824
# Code Coverage enabled build and tests
799825
- b_ubu_codecov: *workflow_trigger_on_tags
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# vim:syntax=dockerfile
2+
#------------------------------------------------------------------------------
3+
# Dockerfile for building and testing Solidity Compiler on CI
4+
# Target: Ubuntu 16.04 (Xenial Xerus) ossfuzz Clang variant
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+
FROM gcr.io/oss-fuzz-base/base-clang as base
25+
26+
ARG DEBIAN_FRONTEND=noninteractive
27+
28+
RUN apt-get update; \
29+
apt-get -qqy install --no-install-recommends \
30+
build-essential \
31+
software-properties-common \
32+
ninja-build git wget \
33+
libbz2-dev zlib1g-dev git curl; \
34+
apt-get install -qy python-pip python-sphinx;
35+
36+
# Install cmake 3.14 (minimum requirement is cmake 3.10)
37+
RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.sh; \
38+
chmod +x cmake-3.14.5-Linux-x86_64.sh; \
39+
./cmake-3.14.5-Linux-x86_64.sh --skip-license --prefix="/usr"
40+
41+
FROM base AS libraries
42+
43+
# Boost
44+
RUN git clone -b boost-1.69.0 https://github.com/boostorg/boost.git \
45+
/usr/src/boost; \
46+
cd /usr/src/boost; \
47+
git submodule update --init --recursive; \
48+
./bootstrap.sh --with-toolset=clang --prefix=/usr; \
49+
./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" headers; \
50+
./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" \
51+
link=static variant=release runtime-link=static \
52+
system filesystem unit_test_framework program_options \
53+
install -j $(($(nproc)/2)); \
54+
rm -rf /usr/src/boost
55+
56+
# Z3
57+
RUN git clone --depth 1 -b z3-4.8.7 https://github.com/Z3Prover/z3.git \
58+
/usr/src/z3; \
59+
cd /usr/src/z3; \
60+
mkdir build; \
61+
cd build; \
62+
LDFLAGS=$CXXFLAGS cmake -DZ3_BUILD_LIBZ3_SHARED=OFF -DCMAKE_INSTALL_PREFIX=/usr \
63+
-DCMAKE_BUILD_TYPE=Release ..; \
64+
make libz3 -j; \
65+
make install; \
66+
rm -rf /usr/src/z3
67+
68+
# OSSFUZZ: libprotobuf-mutator
69+
RUN set -ex; \
70+
git clone https://github.com/google/libprotobuf-mutator.git \
71+
/usr/src/libprotobuf-mutator; \
72+
cd /usr/src/libprotobuf-mutator; \
73+
git checkout 3521f47a2828da9ace403e4ecc4aece1a84feb36; \
74+
mkdir build; \
75+
cd build; \
76+
cmake .. -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON \
77+
-DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release \
78+
-DCMAKE_INSTALL_PREFIX="/usr"; \
79+
ninja; \
80+
cp -vpr external.protobuf/bin/* /usr/bin/; \
81+
cp -vpr external.protobuf/include/* /usr/include/; \
82+
cp -vpr external.protobuf/lib/* /usr/lib/; \
83+
ninja install/strip; \
84+
rm -rf /usr/src/libprotobuf-mutator
85+
86+
# EVMONE
87+
RUN set -ex; \
88+
cd /usr/src; \
89+
git clone --branch="v0.4.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
90+
cd evmone; \
91+
mkdir build; \
92+
cd build; \
93+
cmake -G Ninja -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="/usr" ..; \
94+
ninja; \
95+
ninja install/strip; \
96+
rm -rf /usr/src/evmone
97+
98+
FROM base
99+
COPY --from=libraries /usr/lib /usr/lib
100+
COPY --from=libraries /usr/bin /usr/bin
101+
COPY --from=libraries /usr/include /usr/include

.circleci/docker/Dockerfile.clang.ubuntu1904 renamed to .circleci/docker/Dockerfile.ubuntu1904.clang

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ ENV CC clang
5151
ENV CXX clang++
5252

5353
# Boost
54-
RUN git clone --recursive -b boost-1.69.0 https://github.com/boostorg/boost.git \
54+
RUN git clone -b boost-1.69.0 https://github.com/boostorg/boost.git \
5555
/usr/src/boost; \
5656
cd /usr/src/boost; \
57+
git submodule update --init --recursive; \
5758
./bootstrap.sh --with-toolset=clang --prefix=/usr; \
5859
./b2 toolset=clang headers; \
5960
./b2 toolset=clang variant=release \
@@ -76,7 +77,7 @@ RUN set -ex; \
7677
git clone https://github.com/google/libprotobuf-mutator.git \
7778
/usr/src/libprotobuf-mutator; \
7879
cd /usr/src/libprotobuf-mutator; \
79-
git checkout d1fe8a7d8ae18f3d454f055eba5213c291986f21; \
80+
git checkout 3521f47a2828da9ace403e4ecc4aece1a84feb36; \
8081
mkdir build; \
8182
cd build; \
8283
cmake .. -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON \

CMakeLists.txt

+1-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.3")
13+
set(PROJECT_VERSION "0.6.4")
1414
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)
1515

1616
include(TestBigEndian)

Changelog.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
### 0.6.4 (2020-03-10)
2+
3+
Language Features:
4+
* General: Deprecated `value(...)` and `gas(...)` in favor of `{value: ...}` and `{gas: ...}`
5+
* Inline Assembly: Allow assigning to `_slot` of local storage variable pointers.
6+
* Inline Assembly: Perform control flow analysis on inline assembly. Allows storage returns to be set in assembly only.
7+
8+
9+
Compiler Features:
10+
* AssemblyStack: Support for source locations (source mappings) and thus debugging Yul sources.
11+
* Commandline Interface: Enable output of experimental optimized IR via ``--ir-optimized``.
12+
13+
14+
Bugfixes:
15+
* Inheritance: Fix incorrect error on calling unimplemented base functions.
16+
* Reference Resolver: Fix scoping issue following try/catch statements.
17+
* Standard-JSON-Interface: Fix a bug related to empty filenames and imports.
18+
* SMTChecker: Fix internal errors when analysing tuples.
19+
* Yul AST Import: correctly import blocks as statements, switch statements and string literals.
20+
21+
122
### 0.6.3 (2020-02-18)
223

324
Language Features:
@@ -6,7 +27,6 @@ Language Features:
627
* Report source locations for structured documentation errors.
728

829

9-
1030
Compiler Features:
1131
* AST: Add a new node for doxygen-style, structured documentation that can be received by contract, function, event and modifier definitions.
1232
* Code Generator: Use ``calldatacopy`` instead of ``codecopy`` to zero out memory past input.
@@ -20,7 +40,6 @@ Bugfixes:
2040
* Type Checker: Make invalid calls to uncallable types fatal errors instead of regular.
2141

2242

23-
2443
### 0.6.2 (2020-01-27)
2544

2645
Language Features:

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ build_script:
6464
- msbuild solidity.sln /p:Configuration=%CONFIGURATION% /m:%NUMBER_OF_PROCESSORS% /v:minimal
6565
- cd %APPVEYOR_BUILD_FOLDER%
6666
- scripts\release.bat %CONFIGURATION% 2017
67-
- ps: $bytecodedir = git show -s --format="%cd-%H" --date=short
67+
- ps: $bytecodedir = git show -s --format="%cd-%H" --date="format:%Y-%m-%d-%H-%M"
6868

6969
test_script:
7070
- cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%

cmake/toolchains/libfuzzer.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ set(OSSFUZZ ON CACHE BOOL "Enable fuzzer build" FORCE)
88
# Use libfuzzer as the fuzzing back-end
99
set(LIB_FUZZING_ENGINE "-fsanitize=fuzzer" CACHE STRING "Use libfuzzer back-end" FORCE)
1010
# clang/libfuzzer specific flags for UBSan instrumentation
11-
set(CMAKE_CXX_FLAGS "-O1 -gline-tables-only -fsanitize=undefined -fsanitize=fuzzer-no-link -stdlib=libstdc++" CACHE STRING "Custom compilation flags" FORCE)
11+
set(CMAKE_CXX_FLAGS "-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -I /usr/local/include/c++/v1 -fsanitize=undefined -fsanitize=fuzzer-no-link -stdlib=libc++" CACHE STRING "Custom compilation flags" FORCE)
12+
# Link statically against boost libraries
13+
set(BOOST_FOUND ON CACHE BOOL "" FORCE)
14+
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "Link against static Boost libraries" FORCE)
15+
set(Boost_USE_STATIC_RUNTIME ON CACHE BOOL "Link against static Boost runtime library" FORCE)

docs/assembly.rst

+7-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ You can interleave Solidity statements with inline assembly in a language close
1111
to the one of the Ethereum virtual machine. This gives you more fine-grained control,
1212
which is especially useful when you are enhancing the language by writing libraries.
1313

14-
The language used for inline assembly in Solidity is called `Yul <yul>`_
14+
The language used for inline assembly in Solidity is called :ref:`Yul <yul>`
1515
and it is documented in its own section. This section will only cover
1616
how the inline assembly code can interface with the surrounding Solidity code.
1717

@@ -24,7 +24,7 @@ how the inline assembly code can interface with the surrounding Solidity code.
2424

2525

2626
An inline assembly block is marked by ``assembly { ... }``, where the code inside
27-
the curly braces is code in the `Yul <yul>`_ language.
27+
the curly braces is code in the :ref:`Yul <yul>` language.
2828

2929
The inline assembly code can access local Solidity variables as explained below.
3030

@@ -172,6 +172,11 @@ Assignments are possible to assembly-local variables and to function-local
172172
variables. Take care that when you assign to variables that point to
173173
memory or storage, you will only change the pointer and not the data.
174174

175+
You can assign to the ``_slot`` part of a local storage variable pointer.
176+
For these (structs, arrays or mappings), the ``_offset`` part is always zero.
177+
It is not possible to assign to the ``_slot`` or ``_offset`` part of a state variable,
178+
though.
179+
175180

176181

177182
Things to Avoid
@@ -225,4 +230,3 @@ first slot of the array and followed by the array elements.
225230
Statically-sized memory arrays do not have a length field, but it might be added later
226231
to allow better convertibility between statically- and dynamically-sized arrays, so
227232
do not rely on this.
228-

docs/bugs_by_version.json

+4
Original file line numberDiff line numberDiff line change
@@ -888,5 +888,9 @@
888888
"0.6.3": {
889889
"bugs": [],
890890
"released": "2020-02-18"
891+
},
892+
"0.6.4": {
893+
"bugs": [],
894+
"released": "2020-03-10"
891895
}
892896
}

0 commit comments

Comments
 (0)