[hwasan] Untag destination address in hwasan_posix_memalign.

Required on X86 because no TBI.
This commit is contained in:
Evgenii Stepanov 2020-05-08 16:29:46 -07:00
parent 0d4a33ba61
commit 9fcd2b68e7
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}