[winasan] Unpoison the stack in NtTerminateThread
authorDavid Major <dmajor@mozilla.com>
Thu, 20 Sep 2018 14:59:33 +0000 (14:59 +0000)
committerDavid Major <dmajor@mozilla.com>
Thu, 20 Sep 2018 14:59:33 +0000 (14:59 +0000)
commit468f53b58c620031c11e47b3c3f27271797b0771
tree563cd9574599f9ed7954957f61ca8f7c6d408ecf
parentcaa9619bcef4e67f5c2d4603b1d67c4cca6cacd8
[winasan] Unpoison the stack in NtTerminateThread

In long-running builds we've seen some ASan complaints during thread creation that we suspect are due to leftover poisoning from previous threads whose stacks occupied that memory. This patch adds a hook that unpoisons the stack just before the NtTerminateThread syscall.

Differential Revision: https://reviews.llvm.org/D52091

llvm-svn: 342652
compiler-rt/lib/asan/asan_win.cc