diff --git a/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp b/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp index cec5d5501346..aa93c682414d 100644 --- a/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp +++ b/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp @@ -565,6 +565,26 @@ u256 EVMInstructionInterpreter::evalBuiltin( return 0; } + if (fun == "loadimmutable") + { + yulAssert(_arguments.size() == 1); + yulAssert(std::holds_alternative(_arguments[0])); + std::string const identifier = formatLiteral(std::get(_arguments[0])); + // Return a deterministic value based on the identifier. + // This is sufficient for differential fuzzing since the same identifier + // will always return the same value, maintaining trace equivalence. + return u256(h256(identifier)); + } + + if (fun == "setimmutable") + { + yulAssert(_arguments.size() == 3); + // No-op: The real implementation patches placeholder bytes in memory-loaded runtime code. + // For differential fuzzing, this ensures correct code never fails (no false positives), though some + // bugs in setimmutable handling may not be detected (potential false negatives). + return 0; + } + yulAssert(false, "Unknown builtin: " + fun); }