Add experimental EOF options for CLI and Standard JSON.

Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
Daniel Kirchner
2022-11-23 19:53:44 +01:00
co-authored by Kamil Śliwak
parent 3109ce2dbc
commit bf26d3be5a
38 changed files with 198 additions and 22 deletions
@@ -80,7 +80,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
bytes unoptimisedByteCode;
try
{
unoptimisedByteCode = YulAssembler{version, settings, yul_source}.assemble();
unoptimisedByteCode = YulAssembler{version, nullopt, settings, yul_source}.assemble();
}
catch (solidity::yul::StackTooDeepError const&)
{
@@ -123,7 +123,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
bytes optimisedByteCode;
try
{
optimisedByteCode = YulAssembler{version, settings, yul_source}.assemble();
optimisedByteCode = YulAssembler{version, nullopt, settings, yul_source}.assemble();
}
catch (solidity::yul::StackTooDeepError const&)
{
+4 -2
View File
@@ -31,12 +31,14 @@ class YulAssembler
{
public:
YulAssembler(
langutil::EVMVersion _version,
langutil::EVMVersion _evmVersion,
std::optional<uint8_t> _eofVersion,
solidity::frontend::OptimiserSettings _optSettings,
std::string const& _yulSource
):
m_stack(
_version,
_evmVersion,
_eofVersion,
solidity::yul::YulStack::Language::StrictAssembly,
_optSettings,
langutil::DebugInfoSelection::All()
@@ -39,6 +39,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
string input(reinterpret_cast<char const*>(_data), _size);
YulStack stack(
langutil::EVMVersion(),
nullopt,
YulStack::Language::StrictAssembly,
solidity::frontend::OptimiserSettings::full(),
langutil::DebugInfoSelection::All()
@@ -62,6 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
YulStack stack(
langutil::EVMVersion(),
nullopt,
YulStack::Language::StrictAssembly,
solidity::frontend::OptimiserSettings::full(),
DebugInfoSelection::All()
@@ -40,6 +40,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
string input(reinterpret_cast<char const*>(_data), _size);
YulStack stack(
langutil::EVMVersion(),
nullopt,
YulStack::Language::StrictAssembly,
solidity::frontend::OptimiserSettings::full(),
DebugInfoSelection::All()
+1
View File
@@ -64,6 +64,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
// YulStack entry point
YulStack stack(
version,
nullopt,
YulStack::Language::StrictAssembly,
solidity::frontend::OptimiserSettings::full(),
DebugInfoSelection::All()
@@ -63,6 +63,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
// YulStack entry point
YulStack stack(
version,
nullopt,
YulStack::Language::StrictAssembly,
solidity::frontend::OptimiserSettings::full(),
DebugInfoSelection::All()