diff options
| author | Alex Shlyapnikov <alekseys@google.com> | 2017-04-20 20:54:19 +0000 |
|---|---|---|
| committer | Alex Shlyapnikov <alekseys@google.com> | 2017-04-20 20:54:19 +0000 |
| commit | bdbb894a52997c1679d7f716397435c95e637fb3 (patch) | |
| tree | 8349797c7945f1098c7d87e42073640ef0924bd3 /compiler-rt/lib/sanitizer_common/sanitizer_platform.h | |
| parent | 17f37ba3b97d281b258b552b4be5fde6da6df08a (diff) | |
| download | bcm5719-llvm-bdbb894a52997c1679d7f716397435c95e637fb3.tar.gz bcm5719-llvm-bdbb894a52997c1679d7f716397435c95e637fb3.zip | |
Define a suppression for known leaks on pthread_exit call.
Summary: Refer to D32194 for the context.
Reviewers: eugenis
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D32303
llvm-svn: 300886
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_platform.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h index 1a641087857..49732aa3232 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h @@ -259,4 +259,15 @@ # define SANITIZER_GO 0 #endif +// On PowerPC and ARM Thumb, calling pthread_exit() causes LSan to detect leaks. +// pthread_exit() performs unwinding that leads to dlopen'ing libgcc_s.so. +// dlopen mallocs "libgcc_s.so" string which confuses LSan, it fails to realize +// that this allocation happens in dynamic linker and should be ignored. +#if SANITIZER_PPC || defined(__thumb__) +# define SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT 1 +#else +# define SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT 0 +#endif + + #endif // SANITIZER_PLATFORM_H |

