summaryrefslogtreecommitdiff
path: root/lib/esan/esan_interceptors.cpp
diff options
context:
space:
mode:
authorMike Aizatsky <aizatsky@chromium.org>2016-05-03 23:43:45 +0000
committerMike Aizatsky <aizatsky@chromium.org>2016-05-03 23:43:45 +0000
commit5f450c2ebd8af7b7bb07b95c3ed15de1648be760 (patch)
treebfbe99bbec01e4f49a675934dcaeda849dbd3cfe /lib/esan/esan_interceptors.cpp
parent71107c138e2ac4a0365d1b48871488b8d941fb3a (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. Resubmit of http://reviews.llvm.org/D19875 with win build fixes. Reviewers: aizatsky, eugenis Subscribers: tberghammer, llvm-commits, danalbert, vitalybuka, bruening, srhines, kubabrecka, kcc Differential Revision: http://reviews.llvm.org/D19890 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan/esan_interceptors.cpp')
-rw-r--r--lib/esan/esan_interceptors.cpp18
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;