mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6199 from ethereum/ossfuzzsolcreduceinputsize
Reduce input file size for solc and constant optimizer fuzzers.
This commit is contained in:
commit
3059734ae6
@ -21,7 +21,10 @@ using namespace std;
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||
{
|
||||
string input(reinterpret_cast<char const*>(_data), _size);
|
||||
FuzzerUtil::testConstantOptimizer(input, /*quiet=*/true);
|
||||
if (_size <= 250)
|
||||
{
|
||||
string input(reinterpret_cast<char const*>(_data), _size);
|
||||
FuzzerUtil::testConstantOptimizer(input, /*quiet=*/true);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -21,7 +21,10 @@ using namespace std;
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||
{
|
||||
string input(reinterpret_cast<char const*>(_data), _size);
|
||||
FuzzerUtil::testCompiler(input, /*optimize=*/false, /*quiet=*/true);
|
||||
if (_size <= 600)
|
||||
{
|
||||
string input(reinterpret_cast<char const*>(_data), _size);
|
||||
FuzzerUtil::testCompiler(input, /*optimize=*/false, /*quiet=*/true);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,7 +21,10 @@ using namespace std;
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||
{
|
||||
string input(reinterpret_cast<char const*>(_data), _size);
|
||||
FuzzerUtil::testCompiler(input, /*optimize=*/true, /*quiet=*/true);
|
||||
if (_size <= 600)
|
||||
{
|
||||
string input(reinterpret_cast<char const *>(_data), _size);
|
||||
FuzzerUtil::testCompiler(input, /*optimize=*/true, /*quiet=*/true);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user