[compiler-rt] r334234 - [libFuzzer] When printing NEW_FUNC, use 1-base indexing.
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 7 14:15:24 PDT 2018
Author: kcc
Date: Thu Jun 7 14:15:24 2018
New Revision: 334234
URL: http://llvm.org/viewvc/llvm-project?rev=334234&view=rev
Log:
[libFuzzer] When printing NEW_FUNC, use 1-base indexing.
Summary: Otherwise we print things like [0/1] which is visually confusing.
Reviewers: kcc
Reviewed By: kcc
Subscribers: delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D47837
Modified:
compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp
Modified: compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp?rev=334234&r1=334233&r2=334234&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp (original)
+++ compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp Thu Jun 7 14:15:24 2018
@@ -184,7 +184,7 @@ void TracePC::UpdateObservedPCs() {
}
for (size_t i = 0, N = Min(CoveredFuncs.size(), NumPrintNewFuncs); i < N; i++) {
- Printf("\tNEW_FUNC[%zd/%zd]: ", i, CoveredFuncs.size());
+ Printf("\tNEW_FUNC[%zd/%zd]: ", i + 1, CoveredFuncs.size());
PrintPC("%p %F %L\n", "%p\n", CoveredFuncs[i] + 1);
}
}
More information about the llvm-commits
mailing list