Skip to content

Commit fbda91d

Browse files
committed
Restore mistaken lsan change from upstream. NFC.
In #15086 the intent was to enable `g_thread_finalize_key` under emscripten but I unwittingly modified the ifdef region used by fuchsia is well.
1 parent 1f533bd commit fbda91d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ namespace __lsan {
532532

533533
void InitializeInterceptors() {
534534
// Fuchsia doesn't use interceptors that require any setup.
535-
#if !SANITIZER_FUCHSIA && !SANITIZER_EMSCRIPTEN
535+
#if !SANITIZER_FUCHSIA
536+
#if !SANITIZER_EMSCRIPTEN
536537
InitializeSignalInterceptors();
537538

538539
INTERCEPT_FUNCTION(malloc);
@@ -562,14 +563,16 @@ void InitializeInterceptors() {
562563
LSAN_MAYBE_INTERCEPT_PTHREAD_ATFORK;
563564

564565
LSAN_MAYBE_INTERCEPT_STRERROR;
565-
#endif // !SANITIZER_FUCHSIA && !SANITIZER_EMSCRIPTEN
566+
#endif // !SANITIZER_EMSCRIPTEN
566567

567568
#if !SANITIZER_NETBSD && !SANITIZER_FREEBSD
568569
if (pthread_key_create(&g_thread_finalize_key, &thread_finalize)) {
569570
Report("LeakSanitizer: failed to create thread key.\n");
570571
Die();
571572
}
572573
#endif
574+
575+
#endif // !SANITIZER_FUCHSIA
573576
}
574577

575578
} // namespace __lsan

0 commit comments

Comments
 (0)