forked from OSchip/llvm-project
Revert r343606/r342652 "[winasan] Unpoison the stack in NtTerminateThread""
This still seems to be causing pnacl + asan to crash. llvm-svn: 343876
This commit is contained in:
parent
93552b39c9
commit
11782759e3
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue