[compiler-rt] sanitizer_allocator.cpp: Ensure at least sizeof(void*) alignment (PR #84440)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 09:54:44 PDT 2024
================
@@ -59,7 +59,7 @@ static void *RawInternalAlloc(uptr size, InternalAllocatorCache *cache,
static void *RawInternalRealloc(void *ptr, uptr size,
InternalAllocatorCache *cache) {
- uptr alignment = 8;
+ constexpr usize alignment = Max<usize>(8, sizeof(void *));
----------------
cjappl wrote:
Any reason for the switch in type here?
https://github.com/llvm/llvm-project/pull/84440
More information about the llvm-commits
mailing list