[llvm-commits] [compiler-rt] r163706 - in /compiler-rt/trunk/lib: asan/asan_mac.cc asan/asan_malloc_mac.cc interception/interception_mac.h
Alexey Samsonov
samsonov at google.com
Wed Sep 12 07:10:14 PDT 2012
Author: samsonov
Date: Wed Sep 12 09:10:14 2012
New Revision: 163706
URL: http://llvm.org/viewvc/llvm-project?rev=163706&view=rev
Log:
[ASan] more macro/casting magic to suppress warnings
Modified:
compiler-rt/trunk/lib/asan/asan_mac.cc
compiler-rt/trunk/lib/asan/asan_malloc_mac.cc
compiler-rt/trunk/lib/interception/interception_mac.h
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=163706&r1=163705&r2=163706&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_mac.cc Wed Sep 12 09:10:14 2012
@@ -96,7 +96,7 @@
// the library is preloaded so that the wrappers work. If it is not, set
// DYLD_INSERT_LIBRARIES and re-exec ourselves.
Dl_info info;
- CHECK(dladdr((void*)__asan_init, &info));
+ CHECK(dladdr((void*)((uptr)__asan_init), &info));
const char *dyld_insert_libraries = GetEnv(kDyldInsertLibraries);
if (!dyld_insert_libraries ||
!REAL(strstr)(dyld_insert_libraries, info.dli_fname)) {
@@ -491,7 +491,7 @@
DECLARE_REAL_AND_INTERCEPTOR(void, free, void *ptr)
-DECLARE_REAL_AND_INTERCEPTOR(void, __CFInitialize)
+DECLARE_REAL_AND_INTERCEPTOR(void, __CFInitialize, void)
namespace __asan {
Modified: compiler-rt/trunk/lib/asan/asan_malloc_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_malloc_mac.cc?rev=163706&r1=163705&r2=163706&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_malloc_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_malloc_mac.cc Wed Sep 12 09:10:14 2012
@@ -108,7 +108,7 @@
//
// See http://code.google.com/p/address-sanitizer/issues/detail?id=87
// and http://opensource.apple.com/source/CF/CF-550.43/CFRuntime.c
-INTERCEPTOR(void, __CFInitialize) {
+INTERCEPTOR(void, __CFInitialize, void) {
// If the runtime is built as dynamic library, __CFInitialize wrapper may be
// called before __asan_init.
#if !MAC_INTERPOSE_FUNCTIONS
Modified: compiler-rt/trunk/lib/interception/interception_mac.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/interception_mac.h?rev=163706&r1=163705&r2=163706&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/interception_mac.h (original)
+++ compiler-rt/trunk/lib/interception/interception_mac.h Wed Sep 12 09:10:14 2012
@@ -42,7 +42,7 @@
::__interception::OverrideFunction( \
(::__interception::uptr)old_func, \
(::__interception::uptr)new_func, \
- (::__interception::uptr*)&REAL(old_func))
+ (::__interception::uptr*)((::__interception::uptr)&REAL(old_func)))
# define INTERCEPT_FUNCTION_MAC(func) OVERRIDE_FUNCTION_MAC(func, WRAP(func))
#endif // INTERCEPTION_MAC_H
More information about the llvm-commits
mailing list