Skip to content

Commit 278174f

Browse files
author
kcc
committed
[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/lib/fuzzer@353781 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 243006d commit 278174f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FuzzerTracePC.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,15 @@ void TracePC::PrintCoverage() {
300300
if (FunctionStr.find("in ") == 0)
301301
FunctionStr = FunctionStr.substr(3);
302302
std::string LineStr = DescribePC("%l", VisualizePC);
303-
size_t Line = std::stoul(LineStr);
304303
size_t NumEdges = Last - First;
305304
Vector<uintptr_t> UncoveredPCs;
306305
for (auto TE = First; TE < Last; TE++)
307306
if (!ObservedPCs.count(TE->PC))
308307
UncoveredPCs.push_back(TE->PC);
309308
Printf("%sCOVERED_FUNC: hits: %zd", Counter ? "" : "UN", Counter);
310309
Printf(" edges: %zd/%zd", NumEdges - UncoveredPCs.size(), NumEdges);
311-
Printf(" %s %s:%zd\n", FunctionStr.c_str(), FileStr.c_str(), Line);
310+
Printf(" %s %s:%s\n", FunctionStr.c_str(), FileStr.c_str(),
311+
LineStr.c_str());
312312
if (Counter)
313313
for (auto PC : UncoveredPCs)
314314
Printf(" UNCOVERED_PC: %s\n",

0 commit comments

Comments
 (0)