[asan/win] Use TerminateProcess when we want to exit abnormally

ExitProcess still runs some code which can lead to ASan interceptors
running after CHECK failure. This can lead to deadlock if it CHECK fails
again. Avoid that mess by really exiting immediately.

llvm-svn: 286395
This commit is contained in:
Reid Kleckner 2016-11-09 21:27:58 +00:00
parent 67d1a41226
commit 76b4261082
1 changed files with 2 additions and 1 deletions

View File

@ -656,7 +656,8 @@ uptr internal_sched_yield() {
}
void internal__exit(int exitcode) {
ExitProcess(exitcode);
// ExitProcess runs some finalizers, so use TerminateProcess to avoid that.
TerminateProcess(GetCurrentProcess(), 3);
}
uptr internal_ftruncate(fd_t fd, uptr size) {