[Lldb-commits] [PATCH] D106122: Add a mutex to guard access to the ThreadPlanStack class

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 16 11:19:29 PDT 2021


kastiglione added a comment.

I've also opened D106171 <https://reviews.llvm.org/D106171> as a potential fix. It could be that we merge both diffs, they aren't mutually exclusive.



================
Comment at: lldb/include/lldb/Target/ThreadPlanStack.h:157
   void Clear() {
-    for (auto plan : m_plans_list)
+    for (auto &plan : m_plans_list)
       plan.second.ThreadDestroyed(nullptr);
----------------



================
Comment at: lldb/source/Target/ThreadPlanStack.cpp:417
   // then scan for absent TID's:
-  for (auto thread_plans : m_plans_list) {
+  for (auto &thread_plans : m_plans_list) {
     lldb::tid_t cur_tid = thread_plans.first;
----------------



================
Comment at: lldb/source/Target/ThreadPlanStack.cpp:432
                                    bool skip_unreported) {
-  for (auto elem : m_plans_list) {
+  for (auto &elem : m_plans_list) {
     lldb::tid_t tid = elem.first;
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106122/new/

https://reviews.llvm.org/D106122



More information about the lldb-commits mailing list