[asan] fix android build and lint

llvm-svn: 169968
This commit is contained in:
Kostya Serebryany 2012-12-12 11:37:23 +00:00
parent 4e772db66a
commit 28a32c89e9
2 changed files with 6 additions and 5 deletions

View File

@ -1568,7 +1568,7 @@ TEST(AddressSanitizer, DISABLED_MemIntrinsicCallByPointerTest) {
#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 @@ TEST(AddressSanitizer, pread) {
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 @@ TEST(AddressSanitizer, pread64) {
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),

View File

@ -52,7 +52,6 @@ INTERCEPTOR(ssize_t, pread64, int fd, void *ptr, size_t count, off64_t offset) {
#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