Business Insights
  • Home
  • Crypto
  • Finance Expert
  • Business
  • Invest News
  • Investing
  • Trading
  • Forex
  • Videos
  • Economy
  • Tech
  • Contact

Archives

  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • August 2023
  • January 2023
  • December 2021
  • July 2021
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019

Categories

  • Business
  • Crypto
  • Economy
  • Finance Expert
  • Forex
  • Invest News
  • Investing
  • Tech
  • Trading
  • Uncategorized
  • Videos
Apply Loan
Money Visa
Advertise Us
Money Visa
  • Home
  • Crypto
  • Finance Expert
  • Business
  • Invest News
  • Investing
  • Trading
  • Forex
  • Videos
  • Economy
  • Tech
  • Contact
Announcing the Trillion Dollar Security Initiative
  • Crypto

Solidity optimizer bug | Ethereum Foundation Blog

  • August 31, 2025
  • Roubens Andy King
Total
0
Shares
0
0
0
Total
0
Shares
Share 0
Tweet 0
Pin it 0

A bug in the Solidity optimizer was reported through the Ethereum Foundation Bounty program, by Christoph Jentzsch. This bug is patched as of 2017-05-03, with the release of Solidity 0.4.11.

Background

The bug in question concerned how the optimizer optimizes on constants in the byte code. By “byte code constants”, we mean anything which is PUSHed on the stack (not to be confused with Solidity constants). For example, if the value 0xfffffffffffffffffffffffffffffffffffffffffffffffe is PUSHed, then the optimizer can either do PUSH32 0xfffffffffffffffffffffffffffffffffffffffffffffffe, or choose to encode this as PUSH1 1; NOT;.

An error in the optimizer made optimizations of byte code constants fail for certain cases by producing a routine that did not properly recreate the original constant.

The behavior described in the reported bug was found in a contract in which one method ceased functioning when another – totally unrelated – method was added to the contract. After analysis, it was determined that a number of conditions must exist at once for the bug to trigger. Any combination of conditions that would trigger the bug would consistently have the following two conditions:

  1. The constant needs to start with 0xFF… and end with a long series of zeroes (or vice versa).
  2. The same constant needs to be used in multiple locations, for the optimizer to choose to optimize this particular constant. Alternatively, it needs to be used in the constructor, which optimises for size rather than gas.

In addition to the two conditions above, there are further, more complicated conditions that are required.

Analysis

This bug is present in all released versions of Solidity from at least as far back as summer 2015 to the present. Although the bug has been present since 2015, it seems very hard to trigger by “random” code:

We performed a static analysis of all contract code deployed on the blockchain, and found no occurrence of such an invalidly generated routine. Note, the fact that we have not found a bug in all the contract code does not guarantee the absence of such occurrences.

Improvements

In order to provide better transparency and increased awareness of bugs in Solidity, we have started exporting information about Solidity-related vulnerabilities as JSON-files in the Solidity code repository(1,2). We hope that block explorers will integrate this information along with other contract-related information.

Etherscan has already implemented this, which can be seen here and here.

Concerning the bug itself, we added a mini-EVM to the optimizer which verifies the correctness of each generated routine at compile time.

Furthermore, work has already started on a fully-specified and more high-level intermediate language. Future optimizer routines on this language will be much easier to understand and audit and it will replace the current optimizer.

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Roubens Andy King

Previous Article
Ethereum cofounder Joseph Lubin, ‘ETH will likely 100x from here’
  • Forex

Ethereum cofounder Joseph Lubin, ‘ETH will likely 100x from here’

  • August 31, 2025
  • Roubens Andy King
Read More
Next Article
I don’t need Windows 11 anymore. One final tool freed me from Microsoft
  • Tech

I don’t need Windows 11 anymore. One final tool freed me from Microsoft

  • August 31, 2025
  • Roubens Andy King
Read More
You May Also Like
Solana Price Holds Stronger Than Bitcoin Sets Stage For Breakout To 0
Read More
  • Crypto

Solana Price Holds Stronger Than Bitcoin Sets Stage For Breakout To $240

  • Roubens Andy King
  • August 31, 2025
Bitcoin Bulls Must Protect 0,000 to Keep the Bull Market Going
Read More
  • Crypto

Bitcoin Bulls Must Protect $100,000 to Keep the Bull Market Going

  • Roubens Andy King
  • August 31, 2025
BTC Traders Remain Far From -12% Capitulation Zone
Read More
  • Crypto

BTC Traders Remain Far From -12% Capitulation Zone

  • Roubens Andy King
  • August 31, 2025
Bitcoin Bulls Must Protect 0,000 to Keep the Bull Market Going
Read More
  • Crypto

Bitcoin Bulls Must Protect $100,000 to Keep the Bull Market Going

  • Roubens Andy King
  • August 31, 2025
Bitcoin Price Lags Below 0K — On-Chain Levels To Watch
Read More
  • Crypto

Bitcoin Price Lags Below $110K — On-Chain Levels To Watch

  • Roubens Andy King
  • August 31, 2025
Can BTCfi Keep Miners Secure?
Read More
  • Crypto

Can BTCfi Keep Miners Secure?

  • Roubens Andy King
  • August 31, 2025
ETH and BTC ETFs Reverse Gains with 1M in Outflows Ahead Of New Week
Read More
  • Crypto

ETH and BTC ETFs Reverse Gains with $291M in Outflows Ahead Of New Week

  • Roubens Andy King
  • August 31, 2025
Bitcoin No Longer Plays Gold’s Game
Read More
  • Crypto

Bitcoin No Longer Plays Gold’s Game

  • Roubens Andy King
  • August 31, 2025

Recent Posts

  • Solana Price Holds Stronger Than Bitcoin Sets Stage For Breakout To $240
  • At Bitcoin Asia Everything Was Upside Down
  • Is the stock market open tomorrow for Labor Day? Does the post office deliver mail?
  • Canadian Pacific Kansas City Ltd (CP) Financial Position Strengthened by Credit Amendment
  • Have Central Bank Interventions Repriced Corporate Credit? Part 3
Featured Posts
  • Solana Price Holds Stronger Than Bitcoin Sets Stage For Breakout To 0 1
    Solana Price Holds Stronger Than Bitcoin Sets Stage For Breakout To $240
    • August 31, 2025
  • At Bitcoin Asia Everything Was Upside Down 2
    At Bitcoin Asia Everything Was Upside Down
    • August 31, 2025
  • Is the stock market open tomorrow for Labor Day? Does the post office deliver mail? 3
    Is the stock market open tomorrow for Labor Day? Does the post office deliver mail?
    • August 31, 2025
  • Canadian Pacific Kansas City Ltd (CP) Financial Position Strengthened by Credit Amendment 4
    Canadian Pacific Kansas City Ltd (CP) Financial Position Strengthened by Credit Amendment
    • August 31, 2025
  • Have Central Bank Interventions Repriced Corporate Credit? Part 3 5
    Have Central Bank Interventions Repriced Corporate Credit? Part 3
    • August 31, 2025
Recent Posts
  • Walmart is selling a storage cabinet for  that's perfect for bathrooms and beyond
    Walmart is selling a storage cabinet for $56 that's perfect for bathrooms and beyond
    • August 31, 2025
  • An interview with CrowdStrike CEO George Kurtz on the company’s M&A strategy as it acquires Madrid-based data observability startup Onum for about 0M (Allie Garfinkle/Fortune)
    An interview with CrowdStrike CEO George Kurtz on the company’s M&A strategy as it acquires Madrid-based data observability startup Onum for about $290M (Allie Garfinkle/Fortune)
    • August 31, 2025
  • Bitcoin Bulls Must Protect 0,000 to Keep the Bull Market Going
    Bitcoin Bulls Must Protect $100,000 to Keep the Bull Market Going
    • August 31, 2025
Categories
  • Business (2,003)
  • Crypto (1,398)
  • Economy (115)
  • Finance Expert (1,653)
  • Forex (1,396)
  • Invest News (2,289)
  • Investing (1,393)
  • Tech (1,987)
  • Trading (1,972)
  • Uncategorized (2)
  • Videos (805)

Subscribe

Subscribe now to our newsletter

Money Visa
  • Privacy Policy
  • DMCA
  • Terms of Use
Money & Invest Advices

Input your search keywords and press Enter.