diff options
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/hwasan/hwasan_interceptors.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors.cc b/compiler-rt/lib/hwasan/hwasan_interceptors.cc index edb19a56113..fb0dcb8905c 100644 --- a/compiler-rt/lib/hwasan/hwasan_interceptors.cc +++ b/compiler-rt/lib/hwasan/hwasan_interceptors.cc @@ -217,6 +217,17 @@ INTERCEPTOR_ALIAS(void, malloc_stats, void); #endif #endif // HWASAN_WITH_INTERCEPTORS + +#if HWASAN_WITH_INTERCEPTORS && !defined(__aarch64__) +INTERCEPTOR(int, pthread_create, void *th, void *attr, + void *(*callback)(void *), void *param) { + ScopedTaggingDisabler disabler; + int res = REAL(pthread_create)(UntagPtr(th), UntagPtr(attr), + callback, param); + return res; +} +#endif + static void BeforeFork() { StackDepotLockAll(); } @@ -256,6 +267,9 @@ void InitializeInterceptors() { INTERCEPT_FUNCTION(fork); #if HWASAN_WITH_INTERCEPTORS +#if !defined(__aarch64__) + INTERCEPT_FUNCTION(pthread_create); +#endif INTERCEPT_FUNCTION(realloc); INTERCEPT_FUNCTION(free); #endif |