[PATCH] D85928: [libFuzzer] Added -print_full_coverage flag.
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 17:09:17 PDT 2020
Dor1s added a comment.
@morehouse could you please take a look as well, when you get a chance?
================
Comment at: compiler-rt/lib/fuzzer/FuzzerDriver.cpp:802
+ if (Flags.print_full_coverage) {
+ if (!RunIndividualFiles) {
----------------
since we print the coverage information from within `PrintFinalStats`, it seems like we can just go through the if body starting on the line 817? This literally is a copy of it without some additional printing / parameters check.
================
Comment at: compiler-rt/lib/fuzzer/FuzzerDriver.cpp:297
+int RunOneTestCov(Fuzzer *F, const char *InputFilePath, size_t MaxLen) {
+ Unit U = FileToVector(InputFilePath);
----------------
Dor1s wrote:
> we should be able to re-use the existing `RunOneTest` function. You can explicitly set `detect_leaks` option to zero when `print_full_coverage` is used
Why can't you use the existing `RunOneTest` as suggested in my previous comment here?
================
Comment at: compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:272
-void TracePC::PrintCoverage() {
+void TracePC::PrintCoverage(const bool full) {
if (!EF->__sanitizer_symbolize_pc ||
----------------
let's rename `full` to something like `PrintAllCounters`
================
Comment at: compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:321
+ } else {
+ // -print_coverage=1
+ Printf("%sCOVERED_FUNC: hits: %zd", Counter ? "" : "UN", Counter);
----------------
this comment is incorrect, just delete it
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:842
// See if we already processed this register in another instruction in the
// sequence.
----------------
this and some other files look unrelated, can you exclude them from your commit please?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85928/new/
https://reviews.llvm.org/D85928
More information about the llvm-commits
mailing list