aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-02-17 01:05:11 +0800
committerchriseth <c@ethdev.com>2017-02-17 01:05:11 +0800
commitf66ebbc8e2e07bc5e1b75b6708f2f209229f6bec (patch)
tree5e75a84a2a26f8a689020cf5d04d9b4d37c02817 /test
parent8be318e75bbed68520d3a3ef34f777804b6b60e0 (diff)
downloaddexon-solidity-f66ebbc8e2e07bc5e1b75b6708f2f209229f6bec.tar.gz
dexon-solidity-f66ebbc8e2e07bc5e1b75b6708f2f209229f6bec.tar.zst
dexon-solidity-f66ebbc8e2e07bc5e1b75b6708f2f209229f6bec.zip
Report failures correctly to AFL.
Diffstat (limited to 'test')
-rw-r--r--test/fuzzer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/fuzzer.cpp b/test/fuzzer.cpp
index 5e46662e..85a8fe99 100644
--- a/test/fuzzer.cpp
+++ b/test/fuzzer.cpp
@@ -55,14 +55,14 @@ int main()
if (!Json::Reader().parse(outputString, outputJson))
{
cout << "Compiler produced invalid JSON output." << endl;
- return -1;
+ abort();
}
if (outputJson.isMember("errors"))
{
if (!outputJson["errors"].isArray())
{
cout << "Output JSON has \"errors\" but it is not an array." << endl;
- return -1;
+ abort();
}
for (Json::Value const& error: outputJson["errors"])
{
@@ -79,14 +79,14 @@ int main()
if (!invalid.empty())
{
cout << "Invalid error: \"" << invalid << "\"" << endl;
- return -1;
+ abort();
}
}
}
else if (!outputJson.isMember("contracts"))
{
cout << "Output JSON has neither \"errors\" nor \"contracts\"." << endl;
- return -1;
+ abort();
}
return 0;
}