Skip to content

Commit f66ebbc

Browse files
committed
Report failures correctly to AFL.
1 parent 8be318e commit f66ebbc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/fuzzer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ int main()
5555
if (!Json::Reader().parse(outputString, outputJson))
5656
{
5757
cout << "Compiler produced invalid JSON output." << endl;
58-
return -1;
58+
abort();
5959
}
6060
if (outputJson.isMember("errors"))
6161
{
6262
if (!outputJson["errors"].isArray())
6363
{
6464
cout << "Output JSON has \"errors\" but it is not an array." << endl;
65-
return -1;
65+
abort();
6666
}
6767
for (Json::Value const& error: outputJson["errors"])
6868
{
@@ -79,14 +79,14 @@ int main()
7979
if (!invalid.empty())
8080
{
8181
cout << "Invalid error: \"" << invalid << "\"" << endl;
82-
return -1;
82+
abort();
8383
}
8484
}
8585
}
8686
else if (!outputJson.isMember("contracts"))
8787
{
8888
cout << "Output JSON has neither \"errors\" nor \"contracts\"." << endl;
89-
return -1;
89+
abort();
9090
}
9191
return 0;
9292
}

0 commit comments

Comments
 (0)