From 5a53567620545b995d2c26f12431c8e575dea802 Mon Sep 17 00:00:00 2001 From: Marcos Pividori Date: Wed, 8 Feb 2017 00:03:31 +0000 Subject: [libFuzzer] Use long long to ensure 64 bits. We should always use unsigned long long to ensure 64 bits. On Windows, unsigned long is 4 bytes. This was the reason why value-profile-cmp4.test was failing on Windows. Differential Revision: https://reviews.llvm.org/D29617 llvm-svn: 294390 --- llvm/lib/Fuzzer/FuzzerTracePC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Fuzzer/FuzzerTracePC.cpp') diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.cpp b/llvm/lib/Fuzzer/FuzzerTracePC.cpp index ff1d494bafe..661ad23a8e3 100644 --- a/llvm/lib/Fuzzer/FuzzerTracePC.cpp +++ b/llvm/lib/Fuzzer/FuzzerTracePC.cpp @@ -273,7 +273,7 @@ ATTRIBUTE_TARGET_POPCNT ALWAYS_INLINE ATTRIBUTE_NO_SANITIZE_ALL void TracePC::HandleCmp(uintptr_t PC, T Arg1, T Arg2) { uint64_t ArgXor = Arg1 ^ Arg2; - uint64_t ArgDistance = __builtin_popcountl(ArgXor) + 1; // [1,65] + uint64_t ArgDistance = __builtin_popcountll(ArgXor) + 1; // [1,65] uintptr_t Idx = ((PC & 4095) + 1) * ArgDistance; if (sizeof(T) == 4) TORC4.Insert(ArgXor, Arg1, Arg2); -- cgit v1.2.3