Solidity v0.8.17 fixes an important bug, makes overflow checks on multiplication more efficient and adds an LSP feature to always analyze all files in a project.

Important Bugs

Storage Write Removal Bug On Conditional Early Termination

The bug may result in storage writes being incorrectly considered redundant and removed by the optimizer. The problem manifests in presence of assembly functions that may conditionally terminate the external EVM call using the return() or stop() opcode.

See the security alert post on Storage Write Removal Bug On Conditional Early Termination for more information.

Full Changelog

Important Bugfixes:

  • Yul Optimizer: Prevent the incorrect removal of storage writes before calls to Yul functions that conditionally terminate the external EVM call.

Compiler Features:

  • Code Generator: More efficient overflow checks for multiplication.
  • Language Server: Analyze all files in a project by default (can be customized by setting 'file-load-strategy' to 'directly-opened-and-on-import' in LSP settings object).
  • Yul Optimizer: Simplify the starting offset of zero-length operations to zero.

Bugfixes:

  • Type Checker: Fix internal compiler error on tuple assignments with invalid left-hand side.
  • Yul IR Code Generation: Fix internal compiler error when accessing the .slot member of a mapping through a storage reference in inline assembly.

Build System:

  • Allow disabling pedantic warnings and do not treat warnings as errors during compiler build when -DPEDANTIC=OFF flag is passed to CMake.
  • Update emscripten to version 3.1.19.

A big thank you to all contributors who helped make this release possible! Download the new version of Solidity here: v0.8.17.