aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2019-02-12 00:52:11 +0000
committerKostya Serebryany <kcc@google.com>2019-02-12 00:52:11 +0000
commitbd1c0708ac075a7f82883e70caac41accd8880b6 (patch)
tree2100c8c99da1bfddc89e861ba1c333185808da72
parent5ca1ab061abf9c1e77900e2d1aa0584e15bf6127 (diff)
downloadcompiler-rt-bd1c0708ac075a7f82883e70caac41accd8880b6.tar.gz
[libFuzzer] simplify the code for print_coverage=1 so that it doesn't fail on broken debug info
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353781 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/fuzzer/FuzzerTracePC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/fuzzer/FuzzerTracePC.cpp b/lib/fuzzer/FuzzerTracePC.cpp
index d2edb0044..240d76fb6 100644
--- a/lib/fuzzer/FuzzerTracePC.cpp
+++ b/lib/fuzzer/FuzzerTracePC.cpp
@@ -300,7 +300,6 @@ void TracePC::PrintCoverage() {
if (FunctionStr.find("in ") == 0)
FunctionStr = FunctionStr.substr(3);
std::string LineStr = DescribePC("%l", VisualizePC);
- size_t Line = std::stoul(LineStr);
size_t NumEdges = Last - First;
Vector<uintptr_t> UncoveredPCs;
for (auto TE = First; TE < Last; TE++)
@@ -308,7 +307,8 @@ void TracePC::PrintCoverage() {
UncoveredPCs.push_back(TE->PC);
Printf("%sCOVERED_FUNC: hits: %zd", Counter ? "" : "UN", Counter);
Printf(" edges: %zd/%zd", NumEdges - UncoveredPCs.size(), NumEdges);
- Printf(" %s %s:%zd\n", FunctionStr.c_str(), FileStr.c_str(), Line);
+ Printf(" %s %s:%s\n", FunctionStr.c_str(), FileStr.c_str(),
+ LineStr.c_str());
if (Counter)
for (auto PC : UncoveredPCs)
Printf(" UNCOVERED_PC: %s\n",