[PATCH] D48799: libFuzzer: always print line-break for NEW_FUNC/PC output

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 12:51:50 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT336461: libFuzzer: always print line-break for NEW_FUNC/PC output (authored by kcc, committed by ).

Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48799

Files:
  lib/fuzzer/FuzzerTracePC.cpp


Index: lib/fuzzer/FuzzerTracePC.cpp
===================================================================
--- lib/fuzzer/FuzzerTracePC.cpp
+++ lib/fuzzer/FuzzerTracePC.cpp
@@ -147,8 +147,10 @@
 void TracePC::UpdateObservedPCs() {
   Vector<uintptr_t> CoveredFuncs;
   auto ObservePC = [&](uintptr_t PC) {
-    if (ObservedPCs.insert(PC).second && DoPrintNewPCs)
-      PrintPC("\tNEW_PC: %p %F %L\n", "\tNEW_PC: %p\n", PC + 1);
+    if (ObservedPCs.insert(PC).second && DoPrintNewPCs) {
+      PrintPC("\tNEW_PC: %p %F %L", "\tNEW_PC: %p", PC + 1);
+      Printf("\n");
+    }
   };
 
   auto Observe = [&](const PCTableEntry &TE) {
@@ -185,7 +187,8 @@
 
   for (size_t i = 0, N = Min(CoveredFuncs.size(), NumPrintNewFuncs); i < N; i++) {
     Printf("\tNEW_FUNC[%zd/%zd]: ", i + 1, CoveredFuncs.size());
-    PrintPC("%p %F %L\n", "%p\n", CoveredFuncs[i] + 1);
+    PrintPC("%p %F %L", "%p", CoveredFuncs[i] + 1);
+    Printf("\n");
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48799.154446.patch
Type: text/x-patch
Size: 942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180706/9e81aca7/attachment.bin>


More information about the llvm-commits mailing list