Merge pull request #11238 from ethereum/yul-interpreter-storage-state

Permit Yul interpreter vs Evmone storage comparison.
This commit is contained in:
Bhargava Shastry
2021-04-19 12:22:59 +02:00
committed by GitHub
6 changed files with 20 additions and 7 deletions
@@ -93,8 +93,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
termReason = yulFuzzerUtil::interpret(
os2,
stack.parserResult()->code,
EVMDialect::strictAssemblyForEVMObjects(langutil::EVMVersion()),
(yul::test::yul_fuzzer::yulFuzzerUtil::maxSteps * 4)
EVMDialect::strictAssemblyForEVMObjects(langutil::EVMVersion())
);
if (yulFuzzerUtil::resourceLimitsExceeded(termReason))
+5 -1
View File
@@ -26,6 +26,7 @@ yulFuzzerUtil::TerminationReason yulFuzzerUtil::interpret(
ostream& _os,
shared_ptr<yul::Block> _ast,
Dialect const& _dialect,
bool _outputStorageOnly,
size_t _maxSteps,
size_t _maxTraceSize,
size_t _maxExprNesting
@@ -70,7 +71,10 @@ yulFuzzerUtil::TerminationReason yulFuzzerUtil::interpret(
reason = TerminationReason::ExplicitlyTerminated;
}
state.dumpTraceAndState(_os);
if (_outputStorageOnly)
state.dumpStorage(_os);
else
state.dumpTraceAndState(_os);
return reason;
}
+1
View File
@@ -36,6 +36,7 @@ struct yulFuzzerUtil
std::ostream& _os,
std::shared_ptr<yul::Block> _ast,
Dialect const& _dialect,
bool _outputStorageOnly = false,
size_t _maxSteps = maxSteps,
size_t _maxTraceSize = maxTraceSize,
size_t _maxExprNesting = maxExprNesting