mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
ossfuzz: Reduce test input size to less than equal to 600 bytes.
This commit is contained in:
parent
40171c216d
commit
a370551ea2
@ -22,6 +22,6 @@ using namespace std;
|
|||||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||||
{
|
{
|
||||||
string input(reinterpret_cast<char const*>(_data), _size);
|
string input(reinterpret_cast<char const*>(_data), _size);
|
||||||
FuzzerUtil::testConstantOptimizer(input, true);
|
FuzzerUtil::testConstantOptimizer(input, /*quiet=*/true);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -33,6 +33,8 @@ using namespace std;
|
|||||||
DEFINE_BINARY_PROTO_FUZZER(Function const& _input)
|
DEFINE_BINARY_PROTO_FUZZER(Function const& _input)
|
||||||
{
|
{
|
||||||
string yul_source = functionToString(_input);
|
string yul_source = functionToString(_input);
|
||||||
|
if (yul_source.size() > 600)
|
||||||
|
return;
|
||||||
|
|
||||||
if (const char* dump_path = getenv("PROTO_FUZZER_DUMP_PATH"))
|
if (const char* dump_path = getenv("PROTO_FUZZER_DUMP_PATH"))
|
||||||
{
|
{
|
||||||
|
@ -39,6 +39,8 @@ using namespace yul::test;
|
|||||||
DEFINE_BINARY_PROTO_FUZZER(Function const& _input)
|
DEFINE_BINARY_PROTO_FUZZER(Function const& _input)
|
||||||
{
|
{
|
||||||
string yul_source = functionToString(_input);
|
string yul_source = functionToString(_input);
|
||||||
|
if (yul_source.size() > 600)
|
||||||
|
return;
|
||||||
|
|
||||||
if (const char* dump_path = getenv("PROTO_FUZZER_DUMP_PATH"))
|
if (const char* dump_path = getenv("PROTO_FUZZER_DUMP_PATH"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user