diff options
| author | Kostya Serebryany <kcc@google.com> | 2018-07-06 19:47:00 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2018-07-06 19:47:00 +0000 |
| commit | 2bd02db943adcb56e9fa90f316dac6036eae18c8 (patch) | |
| tree | 836fffd7376653e8cd43df4f8d4e9f010ee4d58b /compiler-rt/lib | |
| parent | dbc72c9009a3b3d0447f1bf6905fbf0e89986fe4 (diff) | |
| download | bcm5719-llvm-2bd02db943adcb56e9fa90f316dac6036eae18c8.tar.gz bcm5719-llvm-2bd02db943adcb56e9fa90f316dac6036eae18c8.zip | |
libFuzzer: always print line-break for NEW_FUNC/PC output
Summary: This is a minor cosmetic change. When function/path exceed ~1000 characters, the output is truncated before the line-break. I noticed this for NEW_FUNC.
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D48799
llvm-svn: 336461
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp index 19c1eaf144c..4e0ff149df6 100644 --- a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp @@ -147,8 +147,10 @@ void TracePC::HandleCallerCallee(uintptr_t Caller, uintptr_t Callee) { 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 @@ void TracePC::UpdateObservedPCs() { 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"); } } |

