github ethereum/solidity v0.7.4
Version 0.7.4

latest releases: v0.8.26, v0.8.25, v0.8.24...
3 years ago

Solidity v0.7.4 fixes a storage corruption bug of medium severity that occurs when copying empty byte arrays to storage.

To learn more about the bug and to check if your contract is vulnerable please read this post with further details about the bug.

We thank John Toman of the Certora development team for finding and reporting the bug.

In addition to the bug fix, this release contains many small fixes and allows you to define constants at file-level. More details can be found in the release announcement.

Important Bugfixes

  • Code Generator: Fix data corruption bug when copying empty byte arrays from memory or calldata to storage.

Language Features

  • Constants can be defined at file level.

Compiler Features

  • Command Line Interface: New option --model-checker-engine allows to choose a specific SMTChecker engine. Options are all (default), bmc, chc and none.
  • Control Flow Graph: Print warning for non-empty functions with unnamed return parameters that are not assigned a value in all code paths.
  • SMTChecker: Support keccak256, sha256, ripemd160 and ecrecover in the CHC engine.
  • SMTChecker: Support inline arrays.
  • SMTChecker: Support variables block, msg and tx in the CHC engine.
  • Standard JSON: New option modelCheckerSettings.engine allows to choose a specific SMTChecker engine. Options are all (default), bmc, chc and none.

Bugfixes

  • Code generator: Fix ABIEncoderV2 pragma from the current module affecting inherited functions and applied modifiers.
  • Code generator: Fix internal compiler error when referencing members via module name but not using the reference.
  • Code generator: Fix internal error on returning structs containing mappings from library function.
  • Code generator: Use revert instead of invalid opcode for out-of-bounds array index access in getter.
  • Contract Level Checker: Add missing check against inheriting functions with ABIEncoderV2 return types in ABIEncoderV1 contracts.
  • Name Resolver: Fix shadowing/same-name warnings for later declarations.
  • Type Checker: Allow arrays of contract types as type expressions and as arguments for abi.decode.
  • Type Checker: Disallow invalid use of library names as type name.
  • Type Checker: Fix internal compiler error caused by storage parameters with nested mappings in libraries.

We especially thank all the contributors that made this release possible:

a3d4, Bhargava Shastry, Christian Parpart, Daniel Kirchner, Đorđe Mijović, franzihei, Harikrishnan Mulackal, Kamil Śliwak, Leonardo Alt, Martin Blicha, Mathias Baumann, Ronald Eddy Jr

If you want to perform a source build, please only use solidity_0.7.4.tar.gz and not the zip provided by github directly.

Don't miss a new solidity release

NewReleases is sending notifications on new releases.