[llvm-commits] [compiler-rt] r170098 - in /compiler-rt/trunk/lib: asan/asan_intercepted_functions.h sanitizer_common/sanitizer_common_interceptors.h

Kostya Serebryany kcc at google.com
Wed Dec 12 21:27:08 PST 2012


Author: kcc
Date: Wed Dec 12 23:27:08 2012
New Revision: 170098

URL: http://llvm.org/viewvc/llvm-project?rev=170098&view=rev
Log:
[asan] fix the Android build (pread64 interceptor again)

Modified:
    compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h

Modified: compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_intercepted_functions.h?rev=170098&r1=170097&r2=170098&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_intercepted_functions.h (original)
+++ compiler-rt/trunk/lib/asan/asan_intercepted_functions.h Wed Dec 12 23:27:08 2012
@@ -49,10 +49,8 @@
 
 #if !defined(__APPLE__)
 # define ASAN_INTERCEPT_STRNLEN 1
-# define ASAN_INTERCEPT_PREAD64 1
 #else
 # define ASAN_INTERCEPT_STRNLEN 0
-# define ASAN_INTERCEPT_PREAD64 0
 #endif
 
 #if defined(__linux__) && !defined(ANDROID)
@@ -156,6 +154,7 @@
 # endif
 
 // unistd.h
+// FIXME: remove these typedefs once we get rid of mach_override.
 typedef uptr size_t;
 typedef sptr ssize_t;
 typedef u64 off_t;

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h?rev=170098&r1=170097&r2=170098&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h Wed Dec 12 23:27:08 2012
@@ -20,6 +20,12 @@
 #ifndef SANITIZER_COMMON_INTERCEPTORS_H
 #define SANITIZER_COMMON_INTERCEPTORS_H
 
+#if defined(__linux__) && !defined(ANDROID)
+# define SANITIZER_INTERCEPT_PREAD64 1
+#else
+# define SANITIZER_INTERCEPT_PREAD64 0
+#endif
+
 typedef uptr size_t;
 typedef sptr ssize_t;
 typedef u64  off_t;
@@ -41,7 +47,7 @@
   return res;
 }
 
-#if ASAN_INTERCEPT_PREAD64
+#if SANITIZER_INTERCEPT_PREAD64
 INTERCEPTOR(ssize_t, pread64, int fd, void *ptr, size_t count, off64_t offset) {
   COMMON_INTERCEPTOR_ENTER(pread64, fd, ptr, count, offset);
   ssize_t res = REAL(pread64)(fd, ptr, count, offset);
@@ -51,7 +57,7 @@
 }
 #endif
 
-#if ASAN_INTERCEPT_PREAD64
+#if SANITIZER_INTERCEPT_PREAD64
 #define INIT_PREAD64 CHECK(INTERCEPT_FUNCTION(pread64))
 #else
 #define INIT_PREAD64





More information about the llvm-commits mailing list