diff options
author | chriseth <c@ethdev.com> | 2017-02-17 01:05:11 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-17 01:05:11 +0800 |
commit | f66ebbc8e2e07bc5e1b75b6708f2f209229f6bec (patch) | |
tree | 5e75a84a2a26f8a689020cf5d04d9b4d37c02817 | |
parent | 8be318e75bbed68520d3a3ef34f777804b6b60e0 (diff) | |
download | dexon-solidity-f66ebbc8e2e07bc5e1b75b6708f2f209229f6bec.tar.gz dexon-solidity-f66ebbc8e2e07bc5e1b75b6708f2f209229f6bec.tar.zst dexon-solidity-f66ebbc8e2e07bc5e1b75b6708f2f209229f6bec.zip |
Report failures correctly to AFL.
-rw-r--r-- | test/fuzzer.cpp | 8 |
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; } |