[compiler-rt] 4540d3b - [NFC][Asan] Return uptr as before D87646
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 00:18:47 PDT 2020
Author: Vitaly Buka
Date: 2020-09-15T00:16:55-07:00
New Revision: 4540d3baad06e060ba1e42c8fb60ba8c32308db5
URL: https://github.com/llvm/llvm-project/commit/4540d3baad06e060ba1e42c8fb60ba8c32308db5
DIFF: https://github.com/llvm/llvm-project/commit/4540d3baad06e060ba1e42c8fb60ba8c32308db5.diff
LOG: [NFC][Asan] Return uptr as before D87646
Added:
Modified:
compiler-rt/lib/asan/asan_allocator.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_allocator.cpp b/compiler-rt/lib/asan/asan_allocator.cpp
index 0e79c4dbd83c..aae69d467381 100644
--- a/compiler-rt/lib/asan/asan_allocator.cpp
+++ b/compiler-rt/lib/asan/asan_allocator.cpp
@@ -161,8 +161,9 @@ class AsanChunk : public ChunkBase {
};
class LargeChunkHeader {
- static constexpr uptr kAllocBegMagic = 0xCC6E96B9;
- atomic_uint64_t magic;
+ static constexpr uptr kAllocBegMagic =
+ FIRST_32_SECOND_64(0xCC6E96B9, 0xCC6E96B9CC6E96B9ULL);
+ atomic_uintptr_t magic;
AsanChunk *chunk_header;
public:
@@ -179,7 +180,7 @@ class LargeChunkHeader {
return;
}
- u64 old = kAllocBegMagic;
+ uptr old = kAllocBegMagic;
if (!atomic_compare_exchange_strong(&magic, &old, 0,
memory_order_release)) {
CHECK_EQ(old, kAllocBegMagic);
More information about the llvm-commits
mailing list