[llvm-commits] [compiler-rt] r172809 - in /compiler-rt/trunk/lib: asan/asan_intercepted_functions.h asan/asan_interceptors.cc msan/msan_interceptors.cc
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jan 18 03:38:23 PST 2013
Author: eugenis
Date: Fri Jan 18 05:38:23 2013
New Revision: 172809
URL: http://llvm.org/viewvc/llvm-project?rev=172809&view=rev
Log:
[sanitizer] Fix Mac build.
Modified:
compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
compiler-rt/trunk/lib/asan/asan_interceptors.cc
compiler-rt/trunk/lib/msan/msan_interceptors.cc
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=172809&r1=172808&r2=172809&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_intercepted_functions.h (original)
+++ compiler-rt/trunk/lib/asan/asan_intercepted_functions.h Fri Jan 18 05:38:23 2013
@@ -226,6 +226,17 @@
DECLARE_FUNCTION_AND_WRAPPER(CFStringRef, CFStringCreateCopy,
CFAllocatorRef alloc, CFStringRef str);
DECLARE_FUNCTION_AND_WRAPPER(void, free, void* ptr);
+
+DECLARE_FUNCTION_AND_WRAPPER(int, vscanf, const char *format, va_list ap)
+DECLARE_FUNCTION_AND_WRAPPER(int, vsscanf, const char *str, const char *format,
+ va_list ap)
+DECLARE_FUNCTION_AND_WRAPPER(int, vfscanf, void *stream, const char *format,
+ va_list ap)
+DECLARE_FUNCTION_AND_WRAPPER(int, scanf, const char *format, ...)
+DECLARE_FUNCTION_AND_WRAPPER(int, fscanf, void* stream, const char *format, ...)
+DECLARE_FUNCTION_AND_WRAPPER(int, sscanf,
+ const char *str, const char *format, ...)
+
#if MAC_INTERPOSE_FUNCTIONS && !defined(MISSING_BLOCKS_SUPPORT)
DECLARE_FUNCTION_AND_WRAPPER(void, dispatch_group_async,
dispatch_group_t dg,
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=172809&r1=172808&r2=172809&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Fri Jan 18 05:38:23 2013
@@ -88,7 +88,8 @@
#define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) ASAN_WRITE_RANGE(ptr, size)
#define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) ASAN_READ_RANGE(ptr, size)
-#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) (void)ctx; ENSURE_ASAN_INITED()
+#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
+ do {ctx = 0; (void)ctx; ENSURE_ASAN_INITED();} while (false)
#define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) do { } while (false)
#define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) do { } while (false)
#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) SetThreadName(name)
Modified: compiler-rt/trunk/lib/msan/msan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/msan_interceptors.cc?rev=172809&r1=172808&r2=172809&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/msan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/msan/msan_interceptors.cc Fri Jan 18 05:38:23 2013
@@ -738,7 +738,8 @@
#define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \
__msan_unpoison(ptr, size)
#define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) do { } while (false)
-#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) (void)ctx; ENSURE_MSAN_INITED()
+#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
+ do {ctx = 0; (void)ctx; ENSURE_MSAN_INITED();} while (false)
#define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) do { } while (false)
#define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) do { } while (false)
#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) do { } while (false) // FIXME
More information about the llvm-commits
mailing list