[PATCH] D29831: [libFuzzer] Use long long to ensure 64 bits.
Marcos Pividori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 10:55:45 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294769: [libFuzzer] Use stoull instead of stol to ensure 64 bits. (authored by mpividori).
Changed prior to commit:
https://reviews.llvm.org/D29831?vs=88009&id=88020#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29831
Files:
llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
Index: llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
+++ llvm/trunk/lib/Fuzzer/FuzzerTracePC.cpp
@@ -138,7 +138,7 @@
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 @@
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29831.88020.patch
Type: text/x-patch
Size: 995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170210/9513749d/attachment.bin>
More information about the llvm-commits
mailing list