summaryrefslogtreecommitdiff
path: root/compiler-rt/lib/hwasan/hwasan_allocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/hwasan/hwasan_allocator.cpp')
-rw-r--r--compiler-rt/lib/hwasan/hwasan_allocator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.cpp b/compiler-rt/lib/hwasan/hwasan_allocator.cpp
index 81a57d3afd4d..1d82db0e3944 100644
--- a/compiler-rt/lib/hwasan/hwasan_allocator.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_allocator.cpp
@@ -363,7 +363,7 @@ int hwasan_posix_memalign(void **memptr, uptr alignment, uptr size,
// OOM error is already taken care of by HwasanAllocate.
return errno_ENOMEM;
CHECK(IsAligned((uptr)ptr, alignment));
- *memptr = ptr;
+ *(void **)UntagPtr(memptr) = ptr;
return 0;
}