[compiler-rt] r332047 - [asan] Enable memtrinsics interception for RTEMS
Walter Lee via llvm-commits
llvm-commits at lists.llvm.org
Thu May 10 14:45:14 PDT 2018
Author: waltl
Date: Thu May 10 14:45:13 2018
New Revision: 332047
URL: http://llvm.org/viewvc/llvm-project?rev=332047&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc
Modified: compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc?rev=332047&r1=332046&r2=332047&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc Thu May 10 14:45:13 2018
@@ -31,14 +31,14 @@ void *__asan_memmove(void *to, const voi
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
More information about the llvm-commits
mailing list