From 7b6c0ce9c6c1e2cc3076e787e0e8d9a43bc2bfcc Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Fri, 31 Mar 2023 00:08:02 +0000 Subject: [PATCH] Revert ""Reland "[hwasan] Provide aliases for c allocation functions for Fuchsia"" This reverts commit 1190a1dbd54d8af074e9d4986c7f9cad5c0037f3. This probably broke https://lab.llvm.org/buildbot/#/builders/77/builds/26043/steps/21/logs/stdio again. --- compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp b/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp index 96b57ba..ad359b1 100644 --- a/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp +++ b/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp @@ -16,9 +16,10 @@ #include "interception/interception.h" #include "sanitizer_common/sanitizer_allocator_dlsym.h" #include "sanitizer_common/sanitizer_allocator_interface.h" -#include "sanitizer_common/sanitizer_mallinfo.h" #include "sanitizer_common/sanitizer_tls_get_addr.h" +#if !SANITIZER_FUCHSIA + using namespace __hwasan; struct DlsymAlloc : public DlSymAllocator { @@ -154,8 +155,10 @@ void *__sanitizer_malloc(uptr size) { } // extern "C" -#if HWASAN_WITH_INTERCEPTORS || SANITIZER_FUCHSIA +#if HWASAN_WITH_INTERCEPTORS # define INTERCEPTOR_ALIAS(RET, FN, ARGS...) \ + extern "C" SANITIZER_INTERFACE_ATTRIBUTE RET WRAP(FN)(ARGS) \ + ALIAS("__sanitizer_" #FN); \ extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE RET FN( \ ARGS) ALIAS("__sanitizer_" #FN) @@ -180,3 +183,5 @@ INTERCEPTOR_ALIAS(int, mallopt, int cmd, int value); INTERCEPTOR_ALIAS(void, malloc_stats, void); # endif #endif // #if HWASAN_WITH_INTERCEPTORS + +#endif // SANITIZER_FUCHSIA -- 2.7.4