Skip to content

Commit 00c0fca

Browse files
authored
Merge pull request #9186 from ethereum/develop
Merge develop into release for 0.6.10
2 parents 3e3065a + bb6d677 commit 00c0fca

File tree

146 files changed

+1685
-641
lines changed

Some content is hidden

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

146 files changed

+1685
-641
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
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.9")
13+
set(PROJECT_VERSION "0.6.10")
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)

Changelog.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
### 0.6.10 (2020-06-11)
2+
3+
Important Bugfixes:
4+
* Fixed a bug related to internal library functions with ``calldata`` parameters called via ``using for``.
5+
6+
7+
Compiler Features:
8+
* Commandline Interface: Re-group help screen.
9+
* Output compilation error codes in standard-json and when using ``--error-codes``.
10+
* Yul: Raise warning for switch statements that only have a default and no other cases.
11+
12+
13+
Bugfixes:
14+
* SMTChecker: Fix internal error when encoding tuples of tuples.
15+
* SMTChecker: Fix aliasing soundness after pushing to an array pointer.
16+
* Type system: Fix internal compiler error on calling externally a function that returns variables with calldata location.
17+
* Type system: Fix bug where a bound function was not found if ``using for`` is applied to explicit reference types.
18+
19+
120
### 0.6.9 (2020-06-04)
221

322
Language Features:

ReleaseChecklist.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
- [ ] Readthedocs account, access to the Solidity project
77
- [ ] Write access to https://github.com/ethereum/homebrew-ethereum
88

9-
### Pre-release
10-
- [ ] Ensure that a Github project exists for the release.
11-
- [ ] Check that all issues and pull requests from the Github project to be released are merged to ``develop``.
9+
### Blog Post
10+
- [ ] Create a post on https://github.com/ethereum/solidity-blog and explain some of the new features or concepts.
1211

1312
### Changelog
1413
- [ ] Sort the changelog entries alphabetically and correct any errors you notice.
@@ -33,8 +32,9 @@
3332
- [ ] Wait for the ``~ethereum/ubuntu/ethereum-static`` PPA build to be finished and published for *all platforms*. SERIOUSLY: DO NOT PROCEED EARLIER!!! *After* the static builds are *published*, copy the static package to the ``~ethereum/ubuntu/ethereum`` PPA for the destination series ``Trusty`` and ``Xenial`` while selecting ``Copy existing binaries``.
3433
- [ ] Check that the Docker release was pushed to Docker Hub (this still seems to have problems, run ``./scripts/docker_deploy_manual.sh v0.x.x``).
3534

36-
### Homebrew
35+
### Homebrew and MacOS
3736
- [ ] Update the version and the hash (``sha256sum solidity_x.x.x.tar.gz``) in https://github.com/ethereum/homebrew-ethereum/blob/master/solidity.rb
37+
- [ ] Take the binary from the ``b_osx`` run of the released commit in circle-ci and add it to the release page as ``solc-macos``.
3838

3939
### Documentation
4040
- [ ] Build the new version on https://readthedocs.org/projects/solidity/ (select `latest` on the bottom of the page and click `BUILD`)

docs/060-breaking-changes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ For most of the topics the compiler will provide suggestions.
4242
storage arrays.
4343

4444
* The new keyword ``abstract`` can be used to mark contracts as abstract. It has to be used
45-
if a contract does not implement all its functions.
45+
if a contract does not implement all its functions. Abstract contracts cannot be created using the ``new`` operator,
46+
and it is not possible to generate bytecode for them during compilation.
4647

4748
* Libraries have to implement all their functions, not only the internal ones.
4849

docs/Solidity.g4

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ userDefinedTypeName
124124
: identifier ( '.' identifier )* ;
125125

126126
mapping
127-
: 'mapping' '(' (elementaryTypeName | userDefinedTypeName) '=>' typeName ')' ;
127+
: 'mapping' '(' mappingKey '=>' typeName ')' ;
128+
129+
mappingKey
130+
: elementaryTypeName
131+
| userDefinedTypeName ;
128132

129133
functionTypeName
130134
: 'function' parameterList modifierList returnParameters? ;
@@ -470,7 +474,7 @@ SingleQuotedStringCharacter
470474
: ~['\r\n\\] | ('\\' .) ;
471475
472476
VersionLiteral
473-
: [0-9]+ '.' [0-9]+ ('.' [0-9]+)? ;
477+
: [0-9]+ ( '.' [0-9]+ ('.' [0-9]+)? )? ;
474478
475479
WS
476480
: [ \t\r\n\u000C]+ -> skip ;

docs/abi-spec.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Function Selector
2424
=================
2525

2626
The first four bytes of the call data for a function call specifies the function to be called. It is the
27-
first (left, high-order in big-endian) four bytes of the Keccak-256 (SHA-3) hash of the signature of
27+
first (left, high-order in big-endian) four bytes of the Keccak-256 hash of the signature of
2828
the function. The signature is defined as the canonical expression of the basic prototype without data
2929
location specifier, i.e.
3030
the function name with the parenthesised list of parameter types. Parameter types are split by a single

docs/bugs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"name": "UsingForCalldata",
4+
"summary": "Function calls to internal library functions with calldata parameters called via ``using for`` can result in invalid data being read.",
5+
"description": "Function calls to internal library functions using the ``using for`` mechanism copied all calldata parameters to memory first and passed them on like that, regardless of whether it was an internal or an external call. Due to that, the called function would receive a memory pointer that is interpreted as a calldata pointer. Since dynamically sized arrays are passed using two stack slots for calldata, but only one for memory, this can lead to stack corruption. An affected library call will consider the JUMPDEST to which it is supposed to return as part of its arguments and will instead jump out to whatever was on the stack before the call.",
6+
"introduced": "0.6.9",
7+
"fixed": "0.6.10",
8+
"severity": "very low"
9+
},
210
{
311
"name": "MissingEscapingInFormatting",
412
"summary": "String literals containing double backslash characters passed directly to external or encoding function calls can lead to a different string being used when ABIEncoderV2 is enabled.",

docs/bugs_by_version.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,10 @@
11051105
],
11061106
"released": "2020-01-02"
11071107
},
1108+
"0.6.10": {
1109+
"bugs": [],
1110+
"released": "2020-06-11"
1111+
},
11081112
"0.6.2": {
11091113
"bugs": [
11101114
"MissingEscapingInFormatting",
@@ -1165,7 +1169,9 @@
11651169
"released": "2020-05-14"
11661170
},
11671171
"0.6.9": {
1168-
"bugs": [],
1172+
"bugs": [
1173+
"UsingForCalldata"
1174+
],
11691175
"released": "2020-06-04"
11701176
}
11711177
}

docs/contracts/inheritance.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ not known in the context of the class where it is used,
194194
although its type is known. This is similar for ordinary
195195
virtual method lookup.
196196

197-
.. _function-overriding:
198-
199197
.. index:: ! overriding;function
200198

199+
.. _function-overriding:
200+
201201
Function Overriding
202202
===================
203203

@@ -317,10 +317,10 @@ of the variable:
317317
While public state variables can override external functions, they themselves cannot
318318
be overridden.
319319

320-
.. _modifier-overriding:
321-
322320
.. index:: ! overriding;modifier
323321

322+
.. _modifier-overriding:
323+
324324
Modifier Overriding
325325
===================
326326

docs/types/reference-types.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,13 @@ Array slices are useful to ABI-decode secondary data passed in function paramete
430430
/// Forward call to "setOwner(address)" that is implemented by client
431431
/// after doing basic validation on the address argument.
432432
function forward(bytes calldata _payload) external {
433-
bytes4 sig = abi.decode(_payload[:4], (bytes4));
433+
// Since ABI decoding requires padded data, we cannot
434+
// use abi.decode(_payload[:4], (bytes4)).
435+
bytes4 sig =
436+
_payload[0] |
437+
(bytes4(_payload[1]) >> 8) |
438+
(bytes4(_payload[2]) >> 16) |
439+
(bytes4(_payload[3]) >> 24);
434440
if (sig == bytes4(keccak256("setOwner(address)"))) {
435441
address owner = abi.decode(_payload[4:], (address));
436442
require(owner != address(0), "Address of owner cannot be zero.");

0 commit comments

Comments
 (0)