Skip to content

v1.5.0

Latest

Choose a tag to compare

@paritytech-revive-release paritytech-revive-release released this 28 Oct 10:22
2942b3a

Changelog

Supported polkadot-sdk rev: 2609.0.0

Added

  • Support for solc v0.8.38.
  • Support for solc v0.8.37. The new slotnum() Yul builtin (EIP-7843) is rejected with an unsupported instruction error, as pallet-revive has no notion of a beacon chain slot number.
  • Support for the standard JSON settings.debug field and the --revert-strings CLI flag. #650

Changed

  • --newyork: Loop-carried variables are typed as the join of the widths flowing into them instead of being forced to I256, and constant shifts are bounded by the operand width and emitted at 64 bits when the result fits, so masked 32-bit loop variables such as those of a SHA-256 round loop stay narrow through the loop. #615
  • The latest supported polkadot-sdk version is now 2609.0.0
  • Updated LLVM to 23.1.3 and vendored fix for a backend miscompilation (llvm/llvm-project#229015).
  • Updated polkavm to 0.37.0. #609 #681
  • The metadata now includes the heap size, stack size and --newyork settings. #671

Fixed

  • --newyork: A bug in dead call value analysis. #589
  • --newyork: a literal free memory pointer at or above the heap size, such as mstore(0x40, not(0)), was trusted, and the surviving mload(0x40) was truncated by the FMP < heap_size range proof. #611
  • --newyork: Object code that fell off the end was not terminated with the implicit EVM return, so LLVM folded away the runtime dispatch and a call would have run the constructor. #598
  • Yul objects carrying deploy code only, without a _deployed runtime sub-object, failed to compile with an LLVM IR verification error. #597
  • --newyork: a memory offset carried by a loop counter resolved to its first iteration address on every iteration, leaving words written by later iterations eligible for native byte order, and a stale free memory pointer survived an unresolvable mstore8, or an unresolvable mstore inside a branch, loop, or called function. #612
  • --newyork: mcopy and call returns overwriting the free memory pointer. #613
  • A zero-length return or revert with an offset at or above 2^32 trapped instead of exiting with empty data; under --newyork a zero-length exit with an offset past the heap size trapped as well. #614
  • --newyork: a static memory access at the top of the address space, such as a store through a free memory pointer corrupted to u64::MAX, crashed the compiler with "attempt to add with overflow". #582
  • --newyork: Fixed a constant folding bug (reproduced only with hand-crafted Yul input). #618
  • resolc: A bug that arbitrarily picks an input mode when multiple are specified. #635
  • Yul objects that resolc cannot represent, a sibling object that is not a contract and the dotted notation for a nested object, aborted the compiler instead of being reported. #600
  • --newyork: In rare cases, a mapping read or write left the wrong bytes in scratch memory. #610
  • --newyork: A miscompilation of mapping return values. #684
  • --newyork: A miscompilation in an integer truncation edge case. #685
  • --newyork: A miscompilation in a loop edge case. #686
  • --newyork: An ICE on a fallback with two loops bounded by msg.data.length. #679
  • --newyork: blobhash and blobbasefee compiled to 0 instead of being rejected. #668
  • --newyork: Constructors read their own arguments as call data. #651
  • --newyork: A missed calldatacopy of unknown length onto the free memory pointer. #655
  • --newyork: The outlined call value check was optimized away. #653
  • Transient storage was not kept big endian, breaking cross VM calls. #667
  • Solidity function or struct names could inject LLVM attributes. #659
  • resolc: -o overwrote same-named contracts in same-named files. #673
  • resolc: Source names starting with a dash failed to compile. #678
  • resolc: --combined-json confused contracts with a colon in the source path. #674
  • resolc: Path handling bugs in --combined-json. #637
  • resolc: Standard JSON source keccak256 hashes were not checked. #677
  • resolc: Standard JSON remappings were reordered. #675
  • resolc: Standard JSON file output selections replaced * instead of adding to it. #670
  • resolc: missingLibraries missed libraries of created contracts. #647
  • resolc: missingLibraries missed libraries used in switch expressions. #644
  • resolc: Library address and factory dependency linker symbols shared a namespace. #645
  • resolc: Objects were linked against factory dependencies they do not reference. #649
  • resolc: --libraries arguments with more than one equal sign were accepted. #641
  • resolc: Out of range memory sizes and linker failures crashed the compiler. #639
  • resolc: Immutable data above the 4 KiB limit was accepted. #640
  • resolc: Wrong line and column in warning source locations. #643
  • resolc: --debug-output-dir file names could collide. #638

Note for macOS Users

The macOS binary is unsigned and it needs to be made runnable using xattr -c resolc-universal-apple-darwin.