{"id":5224,"date":"2026-12-04T23:49:28","date_gmt":"2026-12-04T23:49:28","guid":{"rendered":"https:\/\/wyominginvest.com\/?p=5224"},"modified":"2026-12-04T23:49:28","modified_gmt":"2026-12-04T23:49:28","slug":"solidity-v0-8-39-released-critical-storage-bug-fixes-new-amsterdam-evm-limits-and-a-glimpse-into-the-future-of-version-0-9-0","status":"publish","type":"post","link":"https:\/\/wyominginvest.com\/?p=5224","title":{"rendered":"Solidity v0.8.39 Released: Critical Storage Bug Fixes, New Amsterdam EVM Limits, and a Glimpse Into the Future of Version 0.9.0"},"content":{"rendered":"<p>The development team behind Solidity, the leading smart contract programming language for the Ethereum ecosystem, has officially announced the release of Solidity version 0.8.39. This latest update introduces several important bug fixes, including a medium-severity vulnerability involving recursive storage structures, along with updated compiler warnings for upcoming Ethereum Virtual Machine (EVM) specifications, experimental debugging enhancements, and a strategic shift in how future breaking releases will be handled as the project prepares to transition toward version 0.9.0.<\/p>\n<p>Marking what is expected to be the final chapter in the extensive 0.8 release series, version 0.8.39 addresses a subtle yet impactful bug regarding storage corruption, alongside a minor miscompilation issue in the evmasm pipeline. While bringing immediate stability improvements, the new release also establishes groundwork for upcoming protocol upgrades, signaling a major philosophical shift in the language&#8217;s release cadence moving forward.<\/p>\n<p>Important Bugfixes: Overlapping Recursive Storage Struct Copy Corruption<\/p>\n<p>The most critical update in Solidity v0.8.39 is a fix for a medium-severity bug that could result in silent storage corruption under very specific conditions. The issue manifested when a recursive struct in storage\u2014or an array containing such structs\u2014was copied over another storage location that structurally contained it. <\/p>\n<p>To understand the vulnerability, developers must consider what makes a struct recursive. A recursive struct is one that can contain values of its own type, a common pattern exemplified by structures such as <code>struct Node  Node[] children; uint256 data; <\/code>. When instances of these structures, such as a root node assigned to one of its own children via expressions like <code>root = root.children[0]<\/code> or <code>roots = roots[0].children<\/code>, were manipulated, overlapping memory paths could occur. <\/p>\n<p>In these scenarios, the underlying mechanics of copying the array would inadvertently rewrite the storage area holding the source data before the copy operation had finished reading it. Consequently, elements nested deeply within the source were lost, and any members declared after the array defaulted back to zero without triggering any error or warning from the compiler. <\/p>\n<p>This behavior affected both the traditional evmasm pipeline and the newer IR (Intermediate Representation) pipeline, independent of optimizer settings or targeted EVM versions. Specifically, versions 0.4.9 through 0.8.38 were vulnerable under the evmasm pipeline, while versions 0.8.13 through 0.8.38 were impacted when using the IR pipeline. <\/p>\n<p>To resolve this safely, the compiler team implemented a runtime check that executes during every storage-to-storage copy of a recursive struct or array. While this ensures data integrity, it does introduce a minor gas overhead\u2014even in cases where the source and target do not actually overlap. Furthermore, because the check utilizes stack space while evaluating the target layout, copies directed into deeply nested targets may encounter stack-depth limitations sooner than before. For instance, in benchmark tests compiled with the <code>--via-ir<\/code> flag and the optimizer enabled, the maximum safe nesting depth dropped from 252 levels down to 126 levels.<\/p>\n<p>Despite the severity of the flaw in theory, comprehensive scans of verified smart contracts deployed across the ecosystem, utilizing tools such as the Sourcify database, revealed no active production contracts performing an affected copy operation. The vulnerability itself was responsibly discovered and reported by security researcher cyberthirst through the Ethereum Foundation&#8217;s official bug bounty program.<\/p>\n<p>Other Miscompilations: Swapped Values in Nested Tuple Assignments<\/p>\n<p>In addition to the storage corruption vulnerability, Solidity v0.8.39 resolves a secondary miscompilation issue located within the legacy evmasm pipeline. Under certain narrow conditions, a tuple assignment could mistakenly assign values to the wrong target variables. <\/p>\n<p>This error occurred when a nested tuple on the right-hand side of an expression contained a literal string alongside another value, and that string literal was subsequently assigned to a <code>bytes32<\/code>, <code>bytes<\/code>, or <code>string<\/code> variable. For example, given variables defined as <code>bytes32 z<\/code> and <code>uint256 a<\/code>, an assignment structured like <code>((z, a), b) = ((\"x\", 111), 222)<\/code> would incorrectly allocate the integer <code>111<\/code> to the variable <code>z<\/code> while assigning the string representation to <code>a<\/code>. No compiler error or warning was flagged during this process.<\/p>\n<p>The development team noted that the IR pipeline is entirely unaffected by this flaw and that optimizer settings play no role in triggering it. Furthermore, the issue is not classified as a security threat due to the highly unusual pattern required to reproduce it. Nested tuple assignments are predominantly utilized for handling multiple return values from function calls, and native Solidity functions cannot return raw string literals. Aside from capturing function returns, structural nesting offers no functional advantage over flat tuple assignments or sequential single assignments. Moreover, if an erroneous string literal reference somehow propagates into memory or calldata operations, standard runtime testing and execution behavior would quickly trigger an out-of-gas revert.<\/p>\n<p>Notable Features and Changes: EVM Limits and Debugging<\/p>\n<p>Solidity v0.8.39 introduces crucial updates regarding EVM compatibility and size restrictions. When compiling contracts with the experimental <code>--evm-version amsterdam<\/code> flag, the compiler now issues automated warnings if contract code exceeds 64 KiB or if initcode crosses 128 KiB. <\/p>\n<p>These updated warnings align with upcoming protocol changes introduced by Ethereum Improvement Proposals, specifically EIP-7954, which raises the legacy EIP-170 contract code limit from 24 KiB to 64 KiB, and EIP-3860, which elevates the EIP-3860 initcode boundary from 48 KiB to 128 KiB. For all other designated EVM versions\u2014including the current default Osaka environment\u2014the compiler will continue enforcing the traditional limits. Support for the Amsterdam EVM version remains strictly experimental.<\/p>\n<p>Additionally, the compiler now extends code size warnings to standalone Yul code generation, bringing its diagnostic feedback in line with standard Solidity compilation practices.<\/p>\n<p>For developers focused on tooling and diagnostics, this release also enhances support for the experimental <code>ethdebug<\/code> format. By passing the <code>--ethdebug-resources<\/code> flag alongside <code>--experimental<\/code>, the compiler emits the complete <code>info\/resources<\/code> schema defined in the ethdebug specification. This schema provides deep, structured metadata describing types and their storage layouts to external debuggers, while also serving as a foundational prerequisite for passing complex debugging data cleanly through the Yul pipeline.<\/p>\n<p>A Strategic Pivot: Redefining the Path to Solidity 0.9.0<\/p>\n<p>For several years, the Solidity core team envisioned version 0.9.0 as a monumental, sweeping breaking release that would finally make the IR pipeline the default code generator. Because of this long-standing roadmap, many developers within the community anticipated that upgrading to 0.9.0 would require significant, widespread refactoring of existing codebases.<\/p>\n<p>However, project maintainers have announced a major shift in their release philosophy. While the team remains firmly committed to making the IR pipeline and the newer SSA CFG code generator the default standard, they have decided to decouple this transition from the 0.9.0 version number itself. Holding back releases for a single massive milestone was inadvertently delaying other necessary breaking changes that could safely be introduced earlier.<\/p>\n<p>Moving forward, the Solidity team intends to adopt a more agile release model characterized by more frequent, smaller breaking releases. Consequently, version numbers alone will no longer serve as an indicator of the sheer volume of breaking changes contained within an update. This frequent release cadence will allow maintainers to steadily prune legacy features and technical debt that accumulated throughout the extensive lifecycle of the 0.8 series. <\/p>\n<p>Most of the changes already merged in preparation for 0.9.0 focus on removing features that were deprecated in earlier 0.8 versions. Examples include the elimination of ABI coder v1, virtual modifiers, the legacy <code>ABIEncoderV2<\/code> pragma, the SMTChecker&#8217;s bounded model checking (BMC) engine, and support for EVM versions older than Constantinople. The team plans to release a dedicated pre-release build of version 0.9.0 to allow developers adequate time to test their integration pipelines ahead of the final rollout.<\/p>\n<p>How to Install and Upgrade<\/p>\n<p>Developers looking to upgrade their development environments to the latest compiler version can consult the official installation documentation hosted on the Solidity website. Pre-compiled binaries and source distributions are available directly through the official GitHub release page for v0.8.39. <\/p>\n<p>Developers building the compiler directly from source are strongly advised to avoid using the automatically generated source archives provided by GitHub. Instead, the team recommends downloading the dedicated <code>solidity_0.8.39.tar.gz<\/code> source tarball or explicitly checking out the <code>v0.8.39<\/code> tag via git to ensure build integrity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The development team behind Solidity, the leading smart contract programming language for the Ethereum ecosystem, has officially announced the release of Solidity version 0.8.39. This latest update introduces several important bug fixes, including a medium-severity vulnerability involving recursive storage structures, along with updated compiler warnings for upcoming Ethereum Virtual Machine (EVM) specifications, experimental debugging enhancements,<\/p>\n","protected":false},"author":23,"featured_media":5223,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[366],"tags":[1999,401,201,1802,1662,3606,431,2014,5,400,402,517,955],"class_list":["post-5224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-smart-contract-auditing","tag-amsterdam","tag-auditing","tag-critical","tag-fixes","tag-future","tag-glimpse","tag-limits","tag-released","tag-security","tag-smart-contracts","tag-solidity","tag-storage","tag-version"],"_links":{"self":[{"href":"https:\/\/wyominginvest.com\/index.php?rest_route=\/wp\/v2\/posts\/5224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wyominginvest.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wyominginvest.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wyominginvest.com\/index.php?rest_route=\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/wyominginvest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5224"}],"version-history":[{"count":0,"href":"https:\/\/wyominginvest.com\/index.php?rest_route=\/wp\/v2\/posts\/5224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wyominginvest.com\/index.php?rest_route=\/wp\/v2\/media\/5223"}],"wp:attachment":[{"href":"https:\/\/wyominginvest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wyominginvest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wyominginvest.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}