diff options
author | Mike Aizatsky <aizatsky@chromium.org> | 2016-05-03 21:22:06 +0000 |
---|---|---|
committer | Mike Aizatsky <aizatsky@chromium.org> | 2016-05-03 21:22:06 +0000 |
commit | e32b2d7aa482778cf6656a3090025b8c6ea1668f (patch) | |
tree | 9a01168844d9ae0588eac26f051f41ff5c3695d3 /lib/esan/esan_interceptors.cpp | |
parent | 4e4d4302a346a8619da1ea3ddf2f9fdc13f572b0 (diff) |
[sanitizer] Move stat/__xstat to the common interceptors
Summary:
Adds stat/__xstat to the common interceptors.
Removes the now-duplicate stat/__xstat interceptor from msan/tsan/esan.
This adds stat/__xstat to asan, which previously did not intercept it.
Reviewers: aizatsky, eugenis
Subscribers: tberghammer, danalbert, srhines, kubabrecka, llvm-commits, vitalybuka, eugenis, kcc, bruening
Differential Revision: http://reviews.llvm.org/D19875
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan/esan_interceptors.cpp')
-rw-r--r-- | lib/esan/esan_interceptors.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/esan/esan_interceptors.cpp b/lib/esan/esan_interceptors.cpp index 479fde994..be40032f5 100644 --- a/lib/esan/esan_interceptors.cpp +++ b/lib/esan/esan_interceptors.cpp @@ -249,23 +249,6 @@ INTERCEPTOR(char *, strncpy, char *dst, char *src, uptr n) { return REAL(strncpy)(dst, src, n); } -#if SANITIZER_FREEBSD || SANITIZER_MAC || SANITIZER_ANDROID -INTERCEPTOR(int, stat, const char *path, void *buf) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, stat, path, buf); - COMMON_INTERCEPTOR_READ_STRING(ctx, path, 0); - return REAL(stat)(path, buf); -#define ESAN_INTERCEPT_STAT INTERCEPT_FUNCTION(stat) -#else -INTERCEPTOR(int, __xstat, int version, const char *path, void *buf) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, __xstat, version, path, buf); - COMMON_INTERCEPTOR_READ_STRING(ctx, path, 0); - return REAL(__xstat)(version, path, buf); -} -#define ESAN_INTERCEPT_STAT INTERCEPT_FUNCTION(__xstat) -#endif - #if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_FREEBSD INTERCEPTOR(int, __xstat64, int version, const char *path, void *buf) { void *ctx; @@ -413,7 +396,6 @@ void initializeInterceptors() { INTERCEPT_FUNCTION(strcpy); // NOLINT INTERCEPT_FUNCTION(strncpy); - ESAN_INTERCEPT_STAT; ESAN_MAYBE_INTERCEPT_STAT64; ESAN_MAYBE_INTERCEPT___XSTAT64; ESAN_INTERCEPT_LSTAT; |