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