summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-03-18 08:28:39 +0000
committerDmitry Vyukov <dvyukov@google.com>2014-03-18 08:28:39 +0000
commitd0854c4d2c26fa2d0ba9ea937a5bd31938731bd7 (patch)
tree3867e65e5abef208f2ffeabad43c92efd475a4fb /lib
parentad4d874840fd76540f474029951e1266600b708f (diff)
tsan: add missing interceptor for embed symbolizer
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/tsan/dd/dd_interceptors.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/tsan/dd/dd_interceptors.cc b/lib/tsan/dd/dd_interceptors.cc
index c75330e75..6117a7498 100644
--- a/lib/tsan/dd/dd_interceptors.cc
+++ b/lib/tsan/dd/dd_interceptors.cc
@@ -209,6 +209,19 @@ INTERCEPTOR(int, pthread_cond_destroy, pthread_cond_t *c) {
return res;
}
+
+INTERCEPTOR(char*, realpath, const char *path, char *resolved_path) {
+ return REAL(realpath)(path, resolved_path);
+}
+
+INTERCEPTOR(SSIZE_T, read, int fd, void *ptr, SIZE_T count) {
+ return REAL(read)(fd, ptr, count);
+}
+
+INTERCEPTOR(SSIZE_T, pread, int fd, void *ptr, SIZE_T count, OFF_T offset) {
+ return REAL(pread)(fd, ptr, count, offset);
+}
+
namespace __dsan {
void InitializeInterceptors() {
@@ -237,6 +250,11 @@ void InitializeInterceptors() {
INTERCEPT_FUNCTION_VER(pthread_cond_wait, "GLIBC_2.3.2");
INTERCEPT_FUNCTION_VER(pthread_cond_timedwait, "GLIBC_2.3.2");
INTERCEPT_FUNCTION_VER(pthread_cond_destroy, "GLIBC_2.3.2");
+
+ // for symbolizer
+ INTERCEPT_FUNCTION(realpath);
+ INTERCEPT_FUNCTION(read);
+ INTERCEPT_FUNCTION(pread);
}
} // namespace __dsan