[hwasan] Fix allocator_interface implementation
authorVitaly Buka <vitalybuka@google.com>
Wed, 24 May 2023 23:51:12 +0000 (16:51 -0700)
committerVitaly Buka <vitalybuka@google.com>
Thu, 25 May 2023 01:05:42 +0000 (18:05 -0700)
commitd9b574c312c34ddc88dee7fdb7f55fe748839683
treef3c6cfc112e654d172e9807f4b2576d14193559f
parent76b7dca47d660301666bc920e98e9b235bf5d8bb
[hwasan] Fix allocator_interface implementation

__sanitizer_get_current_allocated_bytes had as body, but allocator
caches were not registered to collect stats. It's done by
SizeClassAllocator64LocalCache::Init().

Reviewed By: thurston

Differential Revision: https://reviews.llvm.org/D151389
compiler-rt/lib/hwasan/hwasan_allocator.cpp
compiler-rt/lib/hwasan/hwasan_allocator.h
compiler-rt/lib/hwasan/hwasan_thread.cpp
compiler-rt/test/sanitizer_common/TestCases/allocator_interface.cpp