diff options
4 files changed, 0 insertions, 48 deletions
diff --git a/compiler-rt/lib/asan/asan_win.cc b/compiler-rt/lib/asan/asan_win.cc index 19ed14be0fe..500beee4358 100644 --- a/compiler-rt/lib/asan/asan_win.cc +++ b/compiler-rt/lib/asan/asan_win.cc @@ -129,37 +129,6 @@ INTERCEPTOR_WINAPI(DWORD, CreateThread, asan_thread_start, t, thr_flags, tid); } -namespace { -BlockingMutex mu_for_thread_tracking(LINKER_INITIALIZED); - -void EnsureWorkerThreadRegistered() { - // FIXME: GetCurrentThread relies on TSD, which might not play well with - // system thread pools. We might want to use something like reference - // counting to zero out GetCurrentThread() underlying storage when the last - // work item finishes? Or can we disable reclaiming of threads in the pool? - BlockingMutexLock l(&mu_for_thread_tracking); - if (__asan::GetCurrentThread()) - return; - - AsanThread *t = AsanThread::Create( - /* start_routine */ nullptr, /* arg */ nullptr, - /* parent_tid */ -1, /* stack */ nullptr, /* detached */ true); - t->Init(); - asanThreadRegistry().StartThread(t->tid(), 0, 0); - SetCurrentThread(t); -} -} // namespace - -INTERCEPTOR_WINAPI(DWORD, NtWaitForWorkViaWorkerFactory, DWORD a, DWORD b) { - // NtWaitForWorkViaWorkerFactory is called from system worker pool threads to - // query work scheduled by BindIoCompletionCallback, QueueUserWorkItem, etc. - // System worker pool threads are created at arbitrary point in time and - // without using CreateThread, so we wrap NtWaitForWorkViaWorkerFactory - // instead and don't register a specific parent_tid/stack. - EnsureWorkerThreadRegistered(); - return REAL(NtWaitForWorkViaWorkerFactory)(a, b); -} - // }}} namespace __asan { @@ -174,12 +143,6 @@ void InitializePlatformInterceptors() { ASAN_INTERCEPT_FUNC(_except_handler3); ASAN_INTERCEPT_FUNC(_except_handler4); #endif - - // NtWaitForWorkViaWorkerFactory is always linked dynamically. - CHECK(::__interception::OverrideFunction( - "NtWaitForWorkViaWorkerFactory", - (uptr)WRAP(NtWaitForWorkViaWorkerFactory), - (uptr *)&REAL(NtWaitForWorkViaWorkerFactory))); } void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { diff --git a/compiler-rt/test/asan/TestCases/Windows/bind_io_completion_callback.cc b/compiler-rt/test/asan/TestCases/Windows/bind_io_completion_callback.cc index 44b92ab9146..ef7e45867ed 100644 --- a/compiler-rt/test/asan/TestCases/Windows/bind_io_completion_callback.cc +++ b/compiler-rt/test/asan/TestCases/Windows/bind_io_completion_callback.cc @@ -1,11 +1,6 @@ // Make sure we can throw exceptions from work items executed via // BindIoCompletionCallback. // -// Clang doesn't support exceptions on Windows yet, so for the time being we -// build this program in two parts: the code with exceptions is built with CL, -// the rest is built with Clang. This represents the typical scenario when we -// build a large project using "clang-cl -fallback -fsanitize=address". -// // RUN: %clangxx_asan %s -o %t.exe // RUN: %run %t.exe 2>&1 | FileCheck %s diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_host.cc b/compiler-rt/test/asan/TestCases/Windows/dll_host.cc index 14c9c4e5dce..d0995c8ef2e 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_host.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_host.cc @@ -24,7 +24,6 @@ // IMPORT: __asan_wrap_HeapReAlloc // IMPORT: __asan_wrap_HeapSize // IMPORT: __asan_wrap_CreateThread -// IMPORT: __asan_wrap_NtWaitForWorkViaWorkerFactory // IMPORT: __asan_wrap_RaiseException // // The exception handlers differ in 32-bit and 64-bit, so we ignore them: diff --git a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item.cc b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item.cc index 2a0b622f621..2a8beb828ee 100644 --- a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item.cc +++ b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item.cc @@ -1,11 +1,6 @@ // Make sure we can throw exceptions from work items executed via // QueueUserWorkItem. // -// Clang doesn't support exceptions on Windows yet, so for the time being we -// build this program in two parts: the code with exceptions is built with CL, -// the rest is built with Clang. This represents the typical scenario when we -// build a large project using "clang-cl -fallback -fsanitize=address". -// // RUN: %clangxx_asan %s -o %t.exe // RUN: %run %t.exe 2>&1 | FileCheck %s |

