[tsan] Invoke malloc/free hooks on darwin
authorJin Xin Ng <njx@google.com>
Thu, 1 Jun 2023 03:59:01 +0000 (03:59 +0000)
committerJin Xin Ng <njx@google.com>
Thu, 1 Jun 2023 18:11:19 +0000 (18:11 +0000)
commit2de54b919ba5fd9ccf37038cddfc36e97eb480af
tree89b673addfbef9a90f9671fe21e64b9361e06d0e
parente48b1e87a319e2e6645d8bb4b08432a7fd08e0b9
[tsan] Invoke malloc/free hooks on darwin

Matches behaviour from tsan_interceptors_posix. This is covered by sanitizer_common/TestCases/malloc_hook.cpp (which is currently failing on darwin)
I've tested it on an arm-based Mac & also compiled to x86_64 on it.

Differential Revision: https://reviews.llvm.org/D151865
compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cpp