diff options
author | Mike Aizatsky <aizatsky@chromium.org> | 2016-05-17 22:26:50 +0000 |
---|---|---|
committer | Mike Aizatsky <aizatsky@chromium.org> | 2016-05-17 22:26:50 +0000 |
commit | 70d33edf9c0838e17620bf7234cde34899285ddc (patch) | |
tree | 614d57006618841809cb978749ccfe86acc26ea8 /lib/tsan | |
parent | 41a8ddbff8f8092409bbbaa753d5ac508c98ee13 (diff) |
[sanitizer] Move *fstat to the common interceptors
Summary:
Adds *fstat to the common interceptors.
Removes the now-duplicate fstat interceptor from msan/tsan
This adds fstat to asan/esan, which previously did not intercept it.
Reviewers: eugenis, vitalybuka, aizatsky
Subscribers: tberghammer, danalbert, srhines, kubabrecka, bruening, kcc
Differential Revision: http://reviews.llvm.org/D20318
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan')
-rw-r--r-- | lib/tsan/rtl/tsan_interceptors.cc | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/lib/tsan/rtl/tsan_interceptors.cc b/lib/tsan/rtl/tsan_interceptors.cc index e43032ec1..3240ff7e5 100644 --- a/lib/tsan/rtl/tsan_interceptors.cc +++ b/lib/tsan/rtl/tsan_interceptors.cc @@ -1358,56 +1358,6 @@ TSAN_INTERCEPTOR(int, pthread_once, void *o, void (*f)()) { return 0; } -#if SANITIZER_LINUX && !SANITIZER_ANDROID -TSAN_INTERCEPTOR(int, __fxstat, int version, int fd, void *buf) { - SCOPED_TSAN_INTERCEPTOR(__fxstat, version, fd, buf); - if (fd > 0) - FdAccess(thr, pc, fd); - return REAL(__fxstat)(version, fd, buf); -} -#define TSAN_MAYBE_INTERCEPT___FXSTAT TSAN_INTERCEPT(__fxstat) -#else -#define TSAN_MAYBE_INTERCEPT___FXSTAT -#endif - -TSAN_INTERCEPTOR(int, fstat, int fd, void *buf) { -#if SANITIZER_FREEBSD || SANITIZER_MAC || SANITIZER_ANDROID - SCOPED_TSAN_INTERCEPTOR(fstat, fd, buf); - if (fd > 0) - FdAccess(thr, pc, fd); - return REAL(fstat)(fd, buf); -#else - SCOPED_TSAN_INTERCEPTOR(__fxstat, 0, fd, buf); - if (fd > 0) - FdAccess(thr, pc, fd); - return REAL(__fxstat)(0, fd, buf); -#endif -} - -#if SANITIZER_LINUX && !SANITIZER_ANDROID -TSAN_INTERCEPTOR(int, __fxstat64, int version, int fd, void *buf) { - SCOPED_TSAN_INTERCEPTOR(__fxstat64, version, fd, buf); - if (fd > 0) - FdAccess(thr, pc, fd); - return REAL(__fxstat64)(version, fd, buf); -} -#define TSAN_MAYBE_INTERCEPT___FXSTAT64 TSAN_INTERCEPT(__fxstat64) -#else -#define TSAN_MAYBE_INTERCEPT___FXSTAT64 -#endif - -#if SANITIZER_LINUX && !SANITIZER_ANDROID -TSAN_INTERCEPTOR(int, fstat64, int fd, void *buf) { - SCOPED_TSAN_INTERCEPTOR(__fxstat64, 0, fd, buf); - if (fd > 0) - FdAccess(thr, pc, fd); - return REAL(__fxstat64)(0, fd, buf); -} -#define TSAN_MAYBE_INTERCEPT_FSTAT64 TSAN_INTERCEPT(fstat64) -#else -#define TSAN_MAYBE_INTERCEPT_FSTAT64 -#endif - TSAN_INTERCEPTOR(int, open, const char *name, int flags, int mode) { SCOPED_TSAN_INTERCEPTOR(open, name, flags, mode); READ_STRING(thr, pc, name, 0); @@ -2536,10 +2486,6 @@ void InitializeInterceptors() { TSAN_INTERCEPT(pthread_once); - TSAN_INTERCEPT(fstat); - TSAN_MAYBE_INTERCEPT___FXSTAT; - TSAN_MAYBE_INTERCEPT_FSTAT64; - TSAN_MAYBE_INTERCEPT___FXSTAT64; TSAN_INTERCEPT(open); TSAN_MAYBE_INTERCEPT_OPEN64; TSAN_INTERCEPT(creat); |