Skip to content

Commit 95e23fa

Browse files
committed
Suppress _emscripten_builtin_pthread_create as leaky
1 parent 5805465 commit 95e23fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

system/lib/compiler-rt/lib/lsan/lsan_common.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ static const char kStdSuppressions[] =
108108
#if SANITIZER_MAC
109109
// For Darwin and os_log/os_trace: https://reviews.llvm.org/D35173
110110
"leak:*_os_trace*\n"
111+
#endif
112+
#if SANITIZER_EMSCRIPTEN
113+
// On Emscripten, LSan checks for leaks during atexit(), which is called before all threads are
114+
// terminated. Since LockStuffAndStopTheWorld() calls the callback on the main thread, instead
115+
// of running the callback on the list of suspended threads, LSan is considering allocations
116+
// within pthread_create as leaky. This supression was added to avoid that.
117+
"leak:_emscripten_builtin_pthread_create\n"
111118
#endif
112119
// TLS leak in some glibc versions, described in
113120
// https://sourceware.org/bugzilla/show_bug.cgi?id=12650.

0 commit comments

Comments
 (0)