[PATCH] D46852: [asan] Workaround to avoid hangs in Chromium tests
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 18:43:08 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT332319: [asan] Workaround to avoid hangs in Chromium tests (authored by vitalybuka, committed by ).
Herald added a subscriber: Sanitizers.
Changed prior to commit:
https://reviews.llvm.org/D46852?vs=146699&id=146733#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D46852
Files:
lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
Index: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+++ lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
@@ -209,10 +209,10 @@
bool ThreadSuspender::SuspendAllThreads() {
ThreadLister thread_lister(pid_);
- bool retry;
+ bool retry = true;
InternalMmapVector<tid_t> threads;
threads.reserve(128);
- do {
+ for (int i = 0; i < 30 && retry; ++i) {
retry = false;
switch (thread_lister.ListThreads(&threads)) {
case ThreadLister::Error:
@@ -227,7 +227,7 @@
for (tid_t tid : threads)
if (SuspendThread(tid))
retry = true;
- } while (retry);
+ };
return suspended_threads_list_.ThreadCount();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46852.146733.patch
Type: text/x-patch
Size: 813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180515/d6846ecc/attachment.bin>
More information about the llvm-commits
mailing list