diff options
author | Reid Kleckner <rnk@google.com> | 2018-10-05 18:48:53 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-10-05 18:48:53 +0000 |
commit | f5fabf0ce9da1bc732529506ad40ceefb7b5fc8b (patch) | |
tree | a6678c93b0e6535683926399e020e9d80112e0ef | |
parent | c6c6707d5c7809a77d2a555a49b051f0f0f90c67 (diff) |
Revert r343606/r342652 "[winasan] Unpoison the stack in NtTerminateThread""
This still seems to be causing pnacl + asan to crash.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@343876 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/asan/asan_win.cc | 12 | ||||
-rw-r--r-- | test/asan/TestCases/Windows/dll_host.cc | 1 |
2 files changed, 1 insertions, 12 deletions
diff --git a/lib/asan/asan_win.cc b/lib/asan/asan_win.cc index 889c5ba7d..5661d911c 100644 --- a/lib/asan/asan_win.cc +++ b/lib/asan/asan_win.cc @@ -154,14 +154,6 @@ INTERCEPTOR_WINAPI(DWORD, CreateThread, asan_thread_start, t, thr_flags, tid); } -INTERCEPTOR_WINAPI(LONG, NtTerminateThread, HANDLE handle, LONG status) { - // Unpoison the terminating thread's stack because the memory may be re-used. - NT_TIB *tib = (NT_TIB *)NtCurrentTeb(); - uptr stackSize = (uptr)tib->StackBase - (uptr)tib->StackLimit; - __asan_unpoison_memory_region(tib->StackLimit, stackSize); - return REAL(NtTerminateThread(handle, status)); -} - // }}} namespace __asan { @@ -177,9 +169,7 @@ void InitializePlatformInterceptors() { ASAN_INTERCEPT_FUNC(CreateThread); ASAN_INTERCEPT_FUNC(SetUnhandledExceptionFilter); - CHECK(::__interception::OverrideFunction("NtTerminateThread", - (uptr)WRAP(NtTerminateThread), - (uptr *)&REAL(NtTerminateThread))); + #ifdef _WIN64 ASAN_INTERCEPT_FUNC(__C_specific_handler); #else diff --git a/test/asan/TestCases/Windows/dll_host.cc b/test/asan/TestCases/Windows/dll_host.cc index 324bd586d..512f930bc 100644 --- a/test/asan/TestCases/Windows/dll_host.cc +++ b/test/asan/TestCases/Windows/dll_host.cc @@ -29,7 +29,6 @@ // IMPORT: __asan_wrap_HeapReAlloc // IMPORT: __asan_wrap_HeapSize // IMPORT: __asan_wrap_CreateThread -// IMPORT: __asan_wrap_NtTerminateThread // IMPORT: __asan_wrap_RaiseException // IMPORT: __asan_wrap_RtlRaiseException // IMPORT: __asan_wrap_SetUnhandledExceptionFilter |