[HWASAN] Fix __sanitizer_get_allocated_{begin,size}
authorVitaly Buka <vitalybuka@google.com>
Wed, 26 Apr 2023 06:35:20 +0000 (23:35 -0700)
committerVitaly Buka <vitalybuka@google.com>
Thu, 27 Apr 2023 01:55:44 +0000 (18:55 -0700)
commit66f162a667bcb9b4a8940eb04083082f1d030ead
treea71eb3a0b5ca9a5394650086ef35147e08de1fe6
parent533b7c1f6c696817df332cc7c9acbe3b454eadf2
[HWASAN] Fix __sanitizer_get_allocated_{begin,size}

HWASAN_ALIASING_MODE needs to untag only
primary allocator pointers.

Reviewed By: kstoimenov, thurston

Differential Revision: https://reviews.llvm.org/D149238
compiler-rt/lib/hwasan/hwasan_allocator.cpp
compiler-rt/test/sanitizer_common/TestCases/Linux/malloc_usable_size.c
compiler-rt/test/sanitizer_common/TestCases/get_allocated_begin.cpp