Skip to content

Commit d6eb255

Browse files
ekpyroncameel
andcommitted
Changelog entry and bug list entry.
Co-authored-by: Kamil Śliwak <[email protected]>
1 parent a33da17 commit d6eb255

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### 0.8.17 (unreleased)
22

33
Important Bugfixes:
4+
* Yul Optimizer: Prevent the incorrect removal of storage writes before calls to Yul functions that conditionally terminate the external EVM call.
45

56

67
Language Features:

docs/bugs.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
[
2+
{
3+
"uid": "SOL-2022-7",
4+
"name": "StorageWriteRemovalBeforeConditionalTermination",
5+
"summary": "Calling functions that conditionally terminate the external EVM call using the assembly statements ``return(...)`` or ``stop()`` may result in incorrect removals of prior storage writes.",
6+
"description": "A call to a Yul function that conditionally terminates the external EVM call could result in prior storage writes being incorrectly removed by the Yul optimizer. This used to happen in cases in which it would have been valid to remove the store, if the Yul function in question never actually terminated the external call, and the control flow always returned back to the caller instead. Conditional termination within the same Yul block instead of within a called function was not affected. In Solidity with optimized via-IR code generation, any storage write before a function conditionally calling ``return(...)`` or ``stop()`` in inline assembly, may have been incorrectly removed, whenever it would have been valid to remove the write without the ``return(...)`` or ``stop()``. In optimized legacy code generation, only inline assembly that did not refer to any Solidity variables and that involved conditionally-terminating user-defined assembly functions could be affected.",
7+
"link": "https://blog.soliditylang.org/2022/09/08/storage-write-removal-before-conditional-termination/",
8+
"introduced": "0.8.13",
9+
"fixed": "0.8.17",
10+
"severity": "medium/high",
11+
"conditions": {
12+
"yulOptimizer": true
13+
}
14+
},
215
{
316
"uid": "SOL-2022-6",
417
"name": "AbiReencodingHeadOverflowWithStaticArrayCleanup",

docs/bugs_by_version.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,7 @@
17371737
},
17381738
"0.8.13": {
17391739
"bugs": [
1740+
"StorageWriteRemovalBeforeConditionalTermination",
17401741
"AbiReencodingHeadOverflowWithStaticArrayCleanup",
17411742
"DirtyBytesArrayToStorage",
17421743
"InlineAssemblyMemorySideEffects",
@@ -1747,6 +1748,7 @@
17471748
},
17481749
"0.8.14": {
17491750
"bugs": [
1751+
"StorageWriteRemovalBeforeConditionalTermination",
17501752
"AbiReencodingHeadOverflowWithStaticArrayCleanup",
17511753
"DirtyBytesArrayToStorage",
17521754
"InlineAssemblyMemorySideEffects"
@@ -1755,12 +1757,15 @@
17551757
},
17561758
"0.8.15": {
17571759
"bugs": [
1760+
"StorageWriteRemovalBeforeConditionalTermination",
17581761
"AbiReencodingHeadOverflowWithStaticArrayCleanup"
17591762
],
17601763
"released": "2022-06-15"
17611764
},
17621765
"0.8.16": {
1763-
"bugs": [],
1766+
"bugs": [
1767+
"StorageWriteRemovalBeforeConditionalTermination"
1768+
],
17641769
"released": "2022-08-08"
17651770
},
17661771
"0.8.2": {

0 commit comments

Comments
 (0)