Solidity v0.7.3 fixes a bug in the dynamic-array cleanup. To learn more about the bug and check if your contract is vulnerable please read this post with further details about the bug. Additionally, v0.7.3 adds the option to stop compilation after the parsing stage using solc --stop-after parsing.
Important Bugfixes
- Code Generator: Properly cleanup after copying dynamic-array to storage for packed types. Read more here.
Notable New Features
Stop Compilation after Parsing
solc --stop-after parsing (or settings.stopAfter = 'parsing' in standard-json) can now be used to instruct the compiler to do as little analysis on the code as possible. It will not even try to load imported (but not specified) files. This can be used to do a quick external analysis on the abstract syntax tree, like building an import hierarchy.
In the future, we might introduce more stages to stop compilation at, but for now, only the first stage "parsing" is supported.
Full Changelog
Compiler Features:
- Code generator: Implemented events with function type as one of its indexed parameters.
- General: Option to stop compilation after parsing stage. Can be used with solc --stop-after parsing
- Optimizer: Optimize exp when base is -1.
- SMTChecker: Support addmod and mulmod.
- SMTChecker: Support array slices.
- SMTChecker: Support type conversions.
Bugfixes:
- Code Generator: Properly cleanup after copying dynamic-array to storage for packed types. Read more here.
- Fixed internal compiler errors for certain contracts involving the new expression.
- JSON AST: Fix internal error when using --ast-json on a function with memory arguments in ABIEncoderV2 contracts.
- Type Checker: Add missing checks for calls using types incompatible with ABIEncoderV1 in modules where ABIEncoderV2 is not enabled.
- Type Checker: Fix internal compiler error when calling .push(<arg>) for a storage array with a nested mapping.
A big thank you to all contributors who helped make this release possible!
Download the new version of Solidity here.