mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11238 from ethereum/yul-interpreter-storage-state
Permit Yul interpreter vs Evmone storage comparison.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user