[llvm-commits] [compiler-rt] r169968 - in /compiler-rt/trunk/lib: asan/tests/asan_test.cc sanitizer_common/sanitizer_common_interceptors.h

Kostya Serebryany kcc at google.com
Wed Dec 12 03:37:24 PST 2012


Author: kcc
Date: Wed Dec 12 05:37:23 2012
New Revision: 169968

URL: http://llvm.org/viewvc/llvm-project?rev=169968&view=rev
Log:
[asan] fix android build and lint

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_test.cc
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=169968&r1=169967&r2=169968&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Wed Dec 12 05:37:23 2012
@@ -1568,7 +1568,7 @@
 
 #ifdef __linux__
 TEST(AddressSanitizer, pread) {
-  char *x = new char [10];
+  char *x = new char[10];
   int fd = open("/proc/self/stat", O_RDONLY);
   ASSERT_GT(fd, 0);
   EXPECT_DEATH(pread(fd, x, 15, 0),
@@ -1579,8 +1579,9 @@
   delete x;
 }
 
+#ifndef ANDROID
 TEST(AddressSanitizer, pread64) {
-  char *x = new char [10];
+  char *x = new char[10];
   int fd = open("/proc/self/stat", O_RDONLY);
   ASSERT_GT(fd, 0);
   EXPECT_DEATH(pread64(fd, x, 15, 0),
@@ -1590,9 +1591,10 @@
   close(fd);
   delete x;
 }
+#endif  // ANDROID
 
 TEST(AddressSanitizer, read) {
-  char *x = new char [10];
+  char *x = new char[10];
   int fd = open("/proc/self/stat", O_RDONLY);
   ASSERT_GT(fd, 0);
   EXPECT_DEATH(read(fd, x, 15),

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=169968&r1=169967&r2=169968&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 05:37:23 2012
@@ -52,7 +52,6 @@
 #define SANITIZER_COMMON_INTERCEPTORS_INIT \
   CHECK(INTERCEPT_FUNCTION(read));         \
   CHECK(INTERCEPT_FUNCTION(pread));        \
-  CHECK(INTERCEPT_FUNCTION(pread64))       \
-  ;
+  CHECK(INTERCEPT_FUNCTION(pread64));
 
 #endif  // SANITIZER_COMMON_INTERCEPTORS_H





More information about the llvm-commits mailing list