mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
While compiling abiv2 proto generated solidity test program, silently ignore stack too deep errors (exception), throw exception otherwise.
This commit is contained in:
parent
bf16f2f75e
commit
2f815c5c35
@ -35,7 +35,7 @@ namespace
|
||||
{
|
||||
/// Test function returns a uint256 value
|
||||
static size_t const expectedOutputLength = 32;
|
||||
/// Expected output value is decimal 1000 or hex 03E8
|
||||
/// Expected output value is decimal 0
|
||||
static uint8_t const expectedOutput[expectedOutputLength] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
@ -123,11 +123,16 @@ DEFINE_PROTO_FUZZER(Contract const& _input)
|
||||
// We always call the function test() that is defined in proto converter template
|
||||
hexEncodedInput = methodIdentifiers["test()"].asString();
|
||||
}
|
||||
// Ignore compilation failures
|
||||
catch (Exception const&)
|
||||
// Ignore stack too deep errors during compilation
|
||||
catch (eth::StackTooDeepException const&)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Do not ignore other compilation failures
|
||||
catch (Exception const&)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
if (const char* dump_path = getenv("PROTO_FUZZER_DUMP_CODE"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user