Radar · Solidity · Archive · Week 19 · May 5 – 11, 2025
SMTChecker bugfix for internal compiler errors
Nice to knowtooling
- What changed
- A bug in the SMTChecker that could cause internal compiler errors has been fixed.
- Production impact
- The source does not say.
- Try it
- Compile a contract that previously triggered an internal error in the SMTChecker and confirm that it now compiles cleanly.
- Source
- github.com/argotorg/solidity/releases/tag/v0.8.30
Understand it, then run it
The SMTChecker is a tool that checks Solidity contracts for potential bugs. In Solidity 0.8.30 a bug in that tool was fixed. The bug could make the compiler crash when it tried to analyze a loop. Now the compiler no longer treats the loop condition as a constant‑condition check, so the crash is avoided. The change is invisible in normal contract code; it only affects the compiler’s internal analysis.
Run it now
// main.sol
pragma solidity ^0.8.37;
// A simple contract that contains a loop.
// The SMTChecker will no longer crash on this contract in 0.8.30.
contract LoopExample {
uint256 public counter;
function run(uint256 n) public {
counter = 0;
for (uint256 i = 0; i < n; i++) {
counter += i;
}
}
}
Tests
// test.sol
import "./main.sol";
contract LoopExampleTest {
LoopExample example;
constructor() {
example = new LoopExample();
}
function test_initialCounterIsZero() public {
require(example.counter() == 0, "counter should start at 0");
}
function test_runAddsNumbers() public {
example.run(3); // 0+1+2 = 3
require(example.counter() == 3, "counter should be 3 after run(3)");
}
}
The test report when we ran it on Solidity 0.8.37 (solc)
2 of 2 tests passed.
- test_initialCounterIsZero28,456 gas
- test_runAddsNumbers50,328 gas
- LoopExampleTest: 1,018 bytes of bytecode, deployed for 299,621 gas
solc 0.8.37 · prague
Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed