[compiler-rt] r353781 - [libFuzzer] simplify the code for print_coverage=1 so that it doesn't fail on broken debug info
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 11 16:52:11 PST 2019
Author: kcc
Date: Mon Feb 11 16:52:11 2019
New Revision: 353781
URL: http://llvm.org/viewvc/llvm-project?rev=353781&view=rev
Log:
[libFuzzer] simplify the code for print_coverage=1 so that it doesn't fail on broken debug info
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=353781&r1=353780&r2=353781&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp (original)
+++ compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp Mon Feb 11 16:52:11 2019
@@ -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",
More information about the llvm-commits
mailing list