You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Solc throws an internal compiler error within UniqueErrorReporter.h when enabling model-checker. I attempted to minimize the reproduction code, but it seems that removing any single expression prevents triggering this exception.
Compile: solc-latest a.sol --model-checker-engine all
contractTest {
function test(stringmemorystr) privatereturns(stringmemory) {
bytesmemory s =bytes(str);
if (s.length>0) {
bool b =true;
for (uint i =0;i < s.length; i++) {
if (s[i] !=hex"20") {
b =false;
break;
}
}
if (b) {
returnhex"";
} else {
bytesmemory t =newbytes(s.length);
uint j =0;
for (uint i =0;i < s.length; i++) {
if (s[i] !=hex"20") {
j++;
}
}
bytesmemory r =newbytes(j);
for (uint k =0; 0< ((((r[1] ==hex"7e"? j : 0) != k ?0 : j) ==2) ?45 : j); k++) {
r[k] = t[k];
}
returnstring(r);
}
}
return str;
}
}
blishko
changed the title
solc throws an internal compiler error within UniqueErrorReporter.h when enabling model-checker
SMTChecker: Internal compiler error in BMC analysis of loop
Feb 12, 2025
contract Test {
function loop() public {
for (uint k = 0; (k == 0 ? true : false); k++) {
}
}
}
The error is triggered in the BMC analysis of the loop condition (option --model-checker-engine bmc).
blishko
changed the title
SMTChecker: Internal compiler error in BMC analysis of loop
SMTChecker: Internal compiler error in BMC analysis of loop condition
Feb 12, 2025
Description
Hi! Solc throws an internal compiler error within UniqueErrorReporter.h when enabling model-checker. I attempted to minimize the reproduction code, but it seems that removing any single expression prevents triggering this exception.
Compile:
solc-latest a.sol --model-checker-engine all
Output:
Solc version:
Version: 0.8.29-develop.2025.2.11+commit.c3152941.Linux.g++
The text was updated successfully, but these errors were encountered: