mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7730 from ethereum/fix-7693
Add chainid and selfbalance opcodes to yul proto fuzzer
This commit is contained in:
commit
79af19db83
@ -437,6 +437,12 @@ void ProtoConverter::visit(NullaryOp const& _x)
|
|||||||
case NullaryOp::GASLIMIT:
|
case NullaryOp::GASLIMIT:
|
||||||
m_output << "gaslimit()";
|
m_output << "gaslimit()";
|
||||||
break;
|
break;
|
||||||
|
case NullaryOp::SELFBALANCE:
|
||||||
|
m_output << "selfbalance()";
|
||||||
|
break;
|
||||||
|
case NullaryOp::CHAINID:
|
||||||
|
m_output << "chainid()";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,6 +237,8 @@ message NullaryOp {
|
|||||||
NUMBER = 14;
|
NUMBER = 14;
|
||||||
DIFFICULTY = 15;
|
DIFFICULTY = 15;
|
||||||
GASLIMIT = 16;
|
GASLIMIT = 16;
|
||||||
|
SELFBALANCE = 17;
|
||||||
|
CHAINID = 18;
|
||||||
}
|
}
|
||||||
required NOp op = 1;
|
required NOp op = 1;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
|||||||
|
|
||||||
// AssemblyStack entry point
|
// AssemblyStack entry point
|
||||||
AssemblyStack stack(
|
AssemblyStack stack(
|
||||||
langutil::EVMVersion(),
|
langutil::EVMVersion(langutil::EVMVersion::istanbul()),
|
||||||
AssemblyStack::Language::StrictAssembly,
|
AssemblyStack::Language::StrictAssembly,
|
||||||
dev::solidity::OptimiserSettings::full()
|
dev::solidity::OptimiserSettings::full()
|
||||||
);
|
);
|
||||||
@ -95,7 +95,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
|||||||
yulFuzzerUtil::TerminationReason termReason = yulFuzzerUtil::interpret(
|
yulFuzzerUtil::TerminationReason termReason = yulFuzzerUtil::interpret(
|
||||||
os1,
|
os1,
|
||||||
stack.parserResult()->code,
|
stack.parserResult()->code,
|
||||||
EVMDialect::strictAssemblyForEVMObjects(langutil::EVMVersion())
|
EVMDialect::strictAssemblyForEVMObjects(langutil::EVMVersion(langutil::EVMVersion::istanbul()))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (termReason == yulFuzzerUtil::TerminationReason::StepLimitReached)
|
if (termReason == yulFuzzerUtil::TerminationReason::StepLimitReached)
|
||||||
@ -105,7 +105,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
|||||||
termReason = yulFuzzerUtil::interpret(
|
termReason = yulFuzzerUtil::interpret(
|
||||||
os2,
|
os2,
|
||||||
stack.parserResult()->code,
|
stack.parserResult()->code,
|
||||||
EVMDialect::strictAssemblyForEVMObjects(langutil::EVMVersion()),
|
EVMDialect::strictAssemblyForEVMObjects(langutil::EVMVersion(langutil::EVMVersion::istanbul())),
|
||||||
(yul::test::yul_fuzzer::yulFuzzerUtil::maxSteps * 4)
|
(yul::test::yul_fuzzer::yulFuzzerUtil::maxSteps * 4)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user