This revision was automatically updated to reflect the committed changes. Closed by commit rL266423: Work around a linux libc bug causing a crash in TaskPool (authored by labath).
Changed prior to commit: http://reviews.llvm.org/D19153?vs=53865&id=53869#toc Repository: rL LLVM http://reviews.llvm.org/D19153 Files: lldb/trunk/source/Utility/TaskPool.cpp Index: lldb/trunk/source/Utility/TaskPool.cpp =================================================================== --- lldb/trunk/source/Utility/TaskPool.cpp +++ lldb/trunk/source/Utility/TaskPool.cpp @@ -61,8 +61,9 @@ if (m_thread_count < max_threads) { m_thread_count++; - lock.unlock(); - + // Note that this detach call needs to happen with the m_tasks_mutex held. This prevents the thread + // from exiting prematurely and triggering a linux libc bug + // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951). std::thread (Worker, this).detach(); } }
Index: lldb/trunk/source/Utility/TaskPool.cpp =================================================================== --- lldb/trunk/source/Utility/TaskPool.cpp +++ lldb/trunk/source/Utility/TaskPool.cpp @@ -61,8 +61,9 @@ if (m_thread_count < max_threads) { m_thread_count++; - lock.unlock(); - + // Note that this detach call needs to happen with the m_tasks_mutex held. This prevents the thread + // from exiting prematurely and triggering a linux libc bug + // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951). std::thread (Worker, this).detach(); } }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits