[llvm-commits] [compiler-rt] r172725 - in /compiler-rt/trunk/lib: asan/asan_intercepted_functions.h sanitizer_common/sanitizer_common_interceptors.h
Kostya Serebryany
kcc at google.com
Thu Jan 17 07:14:20 PST 2013
Author: kcc
Date: Thu Jan 17 09:14:20 2013
New Revision: 172725
URL: http://llvm.org/viewvc/llvm-project?rev=172725&view=rev
Log:
[asan] attempting to fix the Mac build
Modified:
compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h
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=172725&r1=172724&r2=172725&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_intercepted_functions.h (original)
+++ compiler-rt/trunk/lib/asan/asan_intercepted_functions.h Thu Jan 17 09:14:20 2013
@@ -165,6 +165,13 @@
SIZE_T count, OFF64_T offset);
# endif
+#if SANITIZER_INTERCEPT_WRITE
+DECLARE_FUNCTION_AND_WRAPPER(SSIZE_T, write, int fd, void *ptr, SIZE_T count);
+#endif
+#if SANITIZER_INTERCEPT_PWRITE
+DECLARE_FUNCTION_AND_WRAPPER(SSIZE_T, pwrite, int fd, void *ptr, SIZE_T count);
+#endif
+
# if ASAN_INTERCEPT_MLOCKX
// mlock/munlock
DECLARE_FUNCTION_AND_WRAPPER(int, mlock, const void *addr, SIZE_T len);
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=172725&r1=172724&r2=172725&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.h Thu Jan 17 09:14:20 2013
@@ -72,7 +72,7 @@
#if SANITIZER_INTERCEPT_WRITE
INTERCEPTOR(SSIZE_T, write, int fd, void *ptr, SIZE_T count) {
- COMMON_INTERCEPTOR_ENTER(read, fd, ptr, count);
+ COMMON_INTERCEPTOR_ENTER(write, fd, ptr, count);
if (fd >= 0)
COMMON_INTERCEPTOR_FD_RELEASE(fd);
SSIZE_T res = REAL(write)(fd, ptr, count);
@@ -87,7 +87,7 @@
#if SANITIZER_INTERCEPT_PWRITE
INTERCEPTOR(SSIZE_T, pwrite, int fd, void *ptr, SIZE_T count) {
- COMMON_INTERCEPTOR_ENTER(read, fd, ptr, count);
+ COMMON_INTERCEPTOR_ENTER(pwrite, fd, ptr, count);
if (fd >= 0)
COMMON_INTERCEPTOR_FD_RELEASE(fd);
SSIZE_T res = REAL(pwrite)(fd, ptr, count);
@@ -102,7 +102,7 @@
#if SANITIZER_INTERCEPT_PWRITE64
INTERCEPTOR(SSIZE_T, pwrite64, int fd, void *ptr, OFF64_T count) {
- COMMON_INTERCEPTOR_ENTER(read, fd, ptr, count);
+ COMMON_INTERCEPTOR_ENTER(pwrite64, fd, ptr, count);
if (fd >= 0)
COMMON_INTERCEPTOR_FD_RELEASE(fd);
SSIZE_T res = REAL(pwrite64)(fd, ptr, count);
More information about the llvm-commits
mailing list