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
@ -20,8 +20,11 @@
|
|||||||
using namespace std;
|
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)
|
||||||
|
{
|
||||||
|
if (_size <= 250)
|
||||||
{
|
{
|
||||||
string input(reinterpret_cast<char const*>(_data), _size);
|
string input(reinterpret_cast<char const*>(_data), _size);
|
||||||
FuzzerUtil::testConstantOptimizer(input, /*quiet=*/true);
|
FuzzerUtil::testConstantOptimizer(input, /*quiet=*/true);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -20,8 +20,11 @@
|
|||||||
using namespace std;
|
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)
|
||||||
|
{
|
||||||
|
if (_size <= 600)
|
||||||
{
|
{
|
||||||
string input(reinterpret_cast<char const*>(_data), _size);
|
string input(reinterpret_cast<char const*>(_data), _size);
|
||||||
FuzzerUtil::testCompiler(input, /*optimize=*/false, /*quiet=*/true);
|
FuzzerUtil::testCompiler(input, /*optimize=*/false, /*quiet=*/true);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,11 @@
|
|||||||
using namespace std;
|
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)
|
||||||
|
{
|
||||||
|
if (_size <= 600)
|
||||||
{
|
{
|
||||||
string input(reinterpret_cast<char const *>(_data), _size);
|
string input(reinterpret_cast<char const *>(_data), _size);
|
||||||
FuzzerUtil::testCompiler(input, /*optimize=*/true, /*quiet=*/true);
|
FuzzerUtil::testCompiler(input, /*optimize=*/true, /*quiet=*/true);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user