[asan] Workaround to avoid hangs in Chromium tests
authorVitaly Buka <vitalybuka@google.com>
Tue, 15 May 2018 01:39:13 +0000 (01:39 +0000)
committerVitaly Buka <vitalybuka@google.com>
Tue, 15 May 2018 01:39:13 +0000 (01:39 +0000)
commit3f1fd7988cc084a8fa42736e1a1b1dd127678907
treebbe29429227d184bf782c3134e9db6fdb9da7c51
parent3969425081dbeb37097fd869338c671e2b5c8f99
[asan] Workaround to avoid hangs in Chromium tests

Summary:
For some reasons on Chromium when we start leak checking we get own pid as 1.
After that we see threads with PPID:0 assuming that thread is dead in infinite
loop.

To resolve particularly this case and possible issues like this, when IsAlive check failed to detect thread status, we need to limit the number of SuspendAllThreads
iterations.

Reviewers: eugenis

Subscribers: kubamracek, llvm-commits

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

llvm-svn: 332319
compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc