[PATCH] D42414: [llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpus
Igor Laevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 2 08:23:04 PST 2018
igor-laevsky added inline comments.
================
Comment at: tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp:68-73
if (verifyModule(*M, &errs())) {
errs() << "mutation result doesn't pass verification\n";
M->dump();
- abort();
+ // Avoid adding incorrect test cases to the corpus.
+ return 0;
+ }
----------------
bogner wrote:
> Can we drop this part and only verify after the reload?
I'm not sure how bitcode writer will behave on the invalid module. I would suspect that this verification is fast compared to the save/reload part.
================
Comment at: tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp:92-93
+ if (!NewM || verifyModule(*NewM, &errs())) {
+ errs() << "mutator failed to re-read the module\n";
+ M->dump();
+ return 0;
----------------
bogner wrote:
> Where does this output go when running the fuzzer? Will we see / be able to act on this information?
This goes to the stderr and I assume this will be visible in the ClusterFuzz logs.
https://reviews.llvm.org/D42414
More information about the llvm-commits
mailing list