mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9273 from ethereum/RemoveIncorrectYulFuzzAssertFailure
yul proto fuzzer: Remove assertion that no errors/warnings while pars…
This commit is contained in:
commit
9d6413df86
@ -59,13 +59,13 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Parse protobuf mutated YUL code
|
// Parse protobuf mutated YUL code
|
||||||
if (!stack.parseAndAnalyze("source", yul_source))
|
if (
|
||||||
return;
|
!stack.parseAndAnalyze("source", yul_source) ||
|
||||||
|
!stack.parserResult()->code ||
|
||||||
yulAssert(stack.errors().empty(), "Parsed successfully but had errors.");
|
!stack.parserResult()->analysisInfo ||
|
||||||
|
!Error::containsOnlyWarnings(stack.errors())
|
||||||
if (!stack.parserResult()->code || !stack.parserResult()->analysisInfo)
|
)
|
||||||
return;
|
yulAssert(false, "Proto fuzzer generated malformed program");
|
||||||
|
|
||||||
// Optimize
|
// Optimize
|
||||||
stack.optimize();
|
stack.optimize();
|
||||||
|
@ -77,8 +77,12 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Parse protobuf mutated YUL code
|
// Parse protobuf mutated YUL code
|
||||||
if (!stack.parseAndAnalyze("source", yul_source) || !stack.parserResult()->code ||
|
if (
|
||||||
!stack.parserResult()->analysisInfo)
|
!stack.parseAndAnalyze("source", yul_source) ||
|
||||||
|
!stack.parserResult()->code ||
|
||||||
|
!stack.parserResult()->analysisInfo ||
|
||||||
|
!Error::containsOnlyWarnings(stack.errors())
|
||||||
|
)
|
||||||
{
|
{
|
||||||
printErrors(std::cout, stack.errors());
|
printErrors(std::cout, stack.errors());
|
||||||
yulAssert(false, "Proto fuzzer generated malformed program");
|
yulAssert(false, "Proto fuzzer generated malformed program");
|
||||||
|
Loading…
Reference in New Issue
Block a user