[llvm-commits] [compiler-rt] r148235 - in /compiler-rt/trunk/lib/asan: asan_interceptors.cc asan_mac.cc asan_mac.h tests/asan_test.cc
Alexey Samsonov
samsonov at google.com
Mon Jan 16 04:38:09 PST 2012
Author: samsonov
Date: Mon Jan 16 06:38:09 2012
New Revision: 148235
URL: http://llvm.org/viewvc/llvm-project?rev=148235&view=rev
Log:
AddressSanitizer: fix recently introduced lint errors and broken test on Mac.
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors.cc
compiler-rt/trunk/lib/asan/asan_mac.cc
compiler-rt/trunk/lib/asan/asan_mac.h
compiler-rt/trunk/lib/asan/tests/asan_test.cc
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=148235&r1=148234&r2=148235&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Mon Jan 16 06:38:09 2012
@@ -53,7 +53,7 @@
(void**)&real_##oldfunc, \
__asan_allocate_island, \
__asan_deallocate_island)); \
- CHECK(real_##oldfunc != NULL); } while(0)
+ CHECK(real_##oldfunc != NULL); } while (0)
#define OVERRIDE_FUNCTION_IF_EXISTS(oldfunc, newfunc) \
do { __asan_mach_override_ptr_custom((void*)(oldfunc), \
Modified: compiler-rt/trunk/lib/asan/asan_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_mac.cc?rev=148235&r1=148234&r2=148235&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_mac.cc Mon Jan 16 06:38:09 2012
@@ -129,7 +129,7 @@
const char *p = *environ;
if (!internal_memcmp(p, name, name_len) &&
p[name_len] == '=') { // Match.
- return *environ + name_len + 1; // String starting after =.
+ return *environ + name_len + 1; // String starting after =.
}
}
environ++;
Modified: compiler-rt/trunk/lib/asan/asan_mac.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_mac.h?rev=148235&r1=148234&r2=148235&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mac.h (original)
+++ compiler-rt/trunk/lib/asan/asan_mac.h Mon Jan 16 06:38:09 2012
@@ -55,13 +55,13 @@
extern "C" {
-
// Allocate memory for the escape island. This cannot be moved to
// mach_override, because the allocator needs to know about the ASan shadow
// mappings.
// TODO(glider): in order to place a relative jump the allocated memory should
// be within 2 Gb from the hint address.
-mach_error_t __asan_allocate_island(void **ptr, size_t unused_size, void *unused_hint);
+mach_error_t __asan_allocate_island(void **ptr, size_t unused_size,
+ void *unused_hint);
mach_error_t __asan_deallocate_island(void *ptr);
// dispatch_barrier_async_f() is not declared in <dispatch/dispatch.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=148235&r1=148234&r2=148235&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Mon Jan 16 06:38:09 2012
@@ -180,7 +180,7 @@
free(pm);
#endif
-#if !defined(APPLE)
+#if !defined(__APPLE__)
int *ma = (int*)memalign(kPageSize, kPageSize);
EXPECT_EQ(0, (uintptr_t)ma % kPageSize);
ma[123] = 0;
More information about the llvm-commits
mailing list