summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerTracePC.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-07-20 01:35:17 +0000
committerKostya Serebryany <kcc@google.com>2017-07-20 01:35:17 +0000
commite55828c7403d038dedae640bd63f23f1f91ffac1 (patch)
tree96f22dc969ce124308d58a1b0cc342f67970d736 /llvm/lib/Fuzzer/FuzzerTracePC.cpp
parentc20b3383b78473fdfb958ebfe15227bded79ba78 (diff)
downloadbcm5719-llvm-e55828c7403d038dedae640bd63f23f1f91ffac1.tar.gz
bcm5719-llvm-e55828c7403d038dedae640bd63f23f1f91ffac1.zip
[libFuzzer] prototype implementation of recursion-depth coverage features (commented out; real implementation needs to use inlined instrumentation)
llvm-svn: 308577
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerTracePC.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerTracePC.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.cpp b/llvm/lib/Fuzzer/FuzzerTracePC.cpp
index ced0a213334..07be441244c 100644
--- a/llvm/lib/Fuzzer/FuzzerTracePC.cpp
+++ b/llvm/lib/Fuzzer/FuzzerTracePC.cpp
@@ -319,6 +319,8 @@ void __sanitizer_cov_trace_pc_guard(uint32_t *Guard) {
uint32_t Idx = *Guard;
__sancov_trace_pc_pcs[Idx] = PC;
__sancov_trace_pc_guard_8bit_counters[Idx]++;
+ // Uncomment the following line to get stack-depth profiling.
+ // fuzzer::TPC.RecordCurrentStack();
}
// Best-effort support for -fsanitize-coverage=trace-pc, which is available
OpenPOWER on IntegriCloud