Skip to content
Snippets Groups Projects
Commit 24c833e1 authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

tsan: add missing interceptor for embed symbolizer

llvm-svn: 204124
parent 26696314
No related branches found
No related tags found
No related merge requests found
...@@ -209,6 +209,19 @@ INTERCEPTOR(int, pthread_cond_destroy, pthread_cond_t *c) { ...@@ -209,6 +209,19 @@ INTERCEPTOR(int, pthread_cond_destroy, pthread_cond_t *c) {
return res; 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 { namespace __dsan {
void InitializeInterceptors() { void InitializeInterceptors() {
...@@ -237,6 +250,11 @@ void InitializeInterceptors() { ...@@ -237,6 +250,11 @@ void InitializeInterceptors() {
INTERCEPT_FUNCTION_VER(pthread_cond_wait, "GLIBC_2.3.2"); 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_timedwait, "GLIBC_2.3.2");
INTERCEPT_FUNCTION_VER(pthread_cond_destroy, "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 } // namespace __dsan
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment