[PATCH] D47641: [asan, myriad] Configure platform interceptors

Walter Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 12:51:56 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL333784: [asan, myriad] Configure platform interceptors (authored by waltl, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D47641?vs=149491&id=149535#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D47641

Files:
  compiler-rt/trunk/lib/asan/asan_malloc_linux.cc
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h


Index: compiler-rt/trunk/lib/asan/asan_malloc_linux.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_malloc_linux.cc
+++ compiler-rt/trunk/lib/asan/asan_malloc_linux.cc
@@ -132,10 +132,12 @@
 }
 #endif // SANITIZER_INTERCEPT_MEMALIGN
 
+#if SANITIZER_INTERCEPT_ALIGNED_ALLOC
 INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) {
   GET_STACK_TRACE_MALLOC;
   return asan_memalign(boundary, size, &stack, FROM_MALLOC);
 }
+#endif // SANITIZER_INTERCEPT_ALIGNED_ALLOC
 
 INTERCEPTOR(uptr, malloc_usable_size, void *ptr) {
   GET_CURRENT_PC_BP_SP;
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -95,6 +95,12 @@
 # define SI_NOT_FUCHSIA 1
 #endif
 
+#if SANITIZER_RTEMS
+# define SI_NOT_RTEMS 0
+#else
+# define SI_NOT_RTEMS 1
+#endif
+
 #if SANITIZER_SOLARIS
 # define SI_SOLARIS 1
 #else
@@ -452,14 +458,17 @@
 #define SANITIZER_INTERCEPT_MMAP SI_POSIX
 #define SANITIZER_INTERCEPT_MMAP64 SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO \
-  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA)
+  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \
+  SI_NOT_RTEMS)
 #define SANITIZER_INTERCEPT_MEMALIGN \
-  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD)
+  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_RTEMS)
 #define SANITIZER_INTERCEPT_PVALLOC \
-  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA)
+  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \
+  SI_NOT_RTEMS)
 #define SANITIZER_INTERCEPT_CFREE \
-  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA)
-#define SANITIZER_INTERCEPT_ALIGNED_ALLOC (!SI_MAC)
+  (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \
+  SI_NOT_RTEMS)
+#define SANITIZER_INTERCEPT_ALIGNED_ALLOC (!SI_MAC && SI_NOT_RTEMS)
 #define SANITIZER_INTERCEPT_MALLOC_USABLE_SIZE (!SI_MAC && !SI_OPENBSD)
 #define SANITIZER_INTERCEPT_MCHECK_MPROBE SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_WCSCAT SI_POSIX


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47641.149535.patch
Type: text/x-patch
Size: 2348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180601/bbc7fe30/attachment.bin>


More information about the llvm-commits mailing list