From ca804caed046bd9f6cc80b8b9d7ceda4e5f65fab Mon Sep 17 00:00:00 2001 From: Walter Lee Date: Thu, 10 May 2018 21:45:13 +0000 Subject: [PATCH] [asan] Enable memtrinsics interception for RTEMS Replace decltype(memcpy) with decltype(__asan_memcpy) because memcpy has not been defined in any headers on RTEMS. Similarly for memmove and memset. Differential Revision: https://reviews.llvm.org/D46625 llvm-svn: 332047 --- .../lib/asan/asan_interceptors_memintrinsics.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc b/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc index c89cb011492e..6d6493175418 100644 --- a/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc +++ b/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc @@ -31,14 +31,14 @@ void *__asan_memmove(void *to, const void *from, uptr size) { ASAN_MEMMOVE_IMPL(nullptr, to, from, size); } -#if SANITIZER_FUCHSIA +#if SANITIZER_FUCHSIA || SANITIZER_RTEMS // Fuchsia doesn't use sanitizer_common_interceptors.inc, but the only // things there it wants are these three. Just define them as aliases // here rather than repeating the contents. -decltype(memcpy) memcpy[[gnu::alias("__asan_memcpy")]]; -decltype(memmove) memmove[[gnu::alias("__asan_memmove")]]; -decltype(memset) memset[[gnu::alias("__asan_memset")]]; +decltype(__asan_memcpy) memcpy[[gnu::alias("__asan_memcpy")]]; +decltype(__asan_memmove) memmove[[gnu::alias("__asan_memmove")]]; +decltype(__asan_memset) memset[[gnu::alias("__asan_memset")]]; -#endif // SANITIZER_FUCHSIA +#endif // SANITIZER_FUCHSIA || SANITIZER_RTEMS -- 2.34.1