[PATCH] D45675: [LibFuzzer] Report when custom counters are available.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 23:50:03 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT330391: [LibFuzzer] Report when custom counters are available. (authored by delcypher, committed by ).
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D45675
Files:
lib/fuzzer/FuzzerTracePC.cpp
test/fuzzer/extra-counters.test
Index: test/fuzzer/extra-counters.test
===================================================================
--- test/fuzzer/extra-counters.test
+++ test/fuzzer/extra-counters.test
@@ -2,6 +2,7 @@
RUN: %cpp_compiler %S/TableLookupTest.cpp -o %t-TableLookupTest
RUN: not %t-TableLookupTest -print_final_stats=1 2>&1 | FileCheck %s
+CHECK: INFO: {{[0-9]+}} Extra Counters
CHECK: BINGO
// Expecting >= 4096 new_units_added
CHECK: stat::new_units_added:{{.*[4][0-9][0-9][0-9]}}
Index: lib/fuzzer/FuzzerTracePC.cpp
===================================================================
--- lib/fuzzer/FuzzerTracePC.cpp
+++ lib/fuzzer/FuzzerTracePC.cpp
@@ -134,6 +134,9 @@
}
if (size_t NumClangCounters = ClangCountersEnd() - ClangCountersBegin())
Printf("INFO: %zd Clang Coverage Counters\n", NumClangCounters);
+
+ if (size_t NumExtraCounters = ExtraCountersEnd() - ExtraCountersBegin())
+ Printf("INFO: %zd Extra Counters\n", NumExtraCounters);
}
ATTRIBUTE_NO_SANITIZE_ALL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45675.143235.patch
Type: text/x-patch
Size: 991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180420/ad962135/attachment.bin>
More information about the llvm-commits
mailing list