[llvm] r294769 - [libFuzzer] Use stoull instead of stol to ensure 64 bits.
Marcos Pividori via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 10:44:15 PST 2017
Author: mpividori
Date: Fri Feb 10 12:44:14 2017
New Revision: 294769
URL: http://llvm.org/viewvc/llvm-project?rev=294769&view=rev
Log:
[libFuzzer] Use stoull instead of stol to ensure 64 bits.
Differential revision: https://reviews.llvm.org/D29831
Modified:
llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp?rev=294769&r1=294768&r2=294769&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp Fri Feb 10 12:44:14 2017
@@ -138,7 +138,7 @@ void TracePC::PrintCoverage() {
sizeof(ModulePathRaw), &OffsetRaw))
continue;
std::string Module = ModulePathRaw;
- uintptr_t FixedPC = std::stol(FixedPCStr, 0, 16);
+ uintptr_t FixedPC = std::stoull(FixedPCStr, 0, 16);
uintptr_t PcOffset = reinterpret_cast<uintptr_t>(OffsetRaw);
ModuleOffsets[Module] = FixedPC - PcOffset;
CoveredPCsPerModule[Module].push_back(PcOffset);
@@ -183,7 +183,7 @@ void TracePC::PrintCoverage() {
if (PcOffsetEnd == std::string::npos)
continue;
S.resize(PcOffsetEnd);
- uintptr_t PcOffset = std::stol(S, 0, 16);
+ uintptr_t PcOffset = std::stoull(S, 0, 16);
if (!std::binary_search(CoveredOffsets.begin(), CoveredOffsets.end(),
PcOffset)) {
uintptr_t PC = ModuleOffset + PcOffset;
More information about the llvm-commits
mailing list