diff --git a/system/lib/compiler-rt/lib/asan/asan_emscripten.cpp b/system/lib/compiler-rt/lib/asan/asan_emscripten.cpp index 90b3c5bbae8ee..59457db3a8252 100644 --- a/system/lib/compiler-rt/lib/asan/asan_emscripten.cpp +++ b/system/lib/compiler-rt/lib/asan/asan_emscripten.cpp @@ -109,8 +109,6 @@ void GetAllocatorCacheRange(uptr *begin, uptr *end) { } #endif -u32 GetCurrentThread() { return __asan::GetCurrentThread()->tid(); } - } // namespace __lsan #endif // SANITIZER_EMSCRIPTEN diff --git a/system/lib/compiler-rt/lib/lsan/lsan_common_emscripten.cpp b/system/lib/compiler-rt/lib/lsan/lsan_common_emscripten.cpp index 2407842cb5828..46bfedb9b519b 100644 --- a/system/lib/compiler-rt/lib/lsan/lsan_common_emscripten.cpp +++ b/system/lib/compiler-rt/lib/lsan/lsan_common_emscripten.cpp @@ -112,8 +112,6 @@ void LockStuffAndStopTheWorld(StopTheWorldCallback callback, UnlockThreads(); } -u32 GetCurrentThreadId(); - // This is based on ProcessThreads in lsan_common.cc. // We changed this to be a callback that gets called per thread by // ThreadRegistry::RunCallbackForEachThreadLocked. @@ -142,7 +140,7 @@ static void ProcessThreadsCallback(ThreadContextBase *tctx, void *arg) { // We can't get the SP for other threads to narrow down the range, but we // we can for the current thread. - if (tctx->tid == GetCurrentThreadId()) { + if (tctx->os_id == GetTid()) { uptr sp = (uptr) __builtin_frame_address(0); if (sp < stack_begin || sp >= stack_end) { // SP is outside the recorded stack range (e.g. the thread is running a