[Lldb-commits] [PATCH] D126240: [lldb] Tighten the scope of a couple of locks in DataFormatters.

Will Hawkins via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 3 12:08:11 PDT 2022


hawkinsw added inline comments.


================
Comment at: lldb/source/DataFormatters/FormatManager.cpp:595
+  {
+    std::lock_guard<std::recursive_mutex> guard(m_language_categories_mutex);
+    m_language_categories_map[lang_type] =
----------------
Forgive me if I am speaking out of turn, but do we need to check again here for whether `lang_type` is in the map? In other words, it seems possible that (in some zany situation) while we are doing the memory allocation (line 593) someone else has come along and added that category since we released the lock on it in 592. 

I hope that this is helpful. Please (again) forgive me if I am speaking out of turn.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126240



More information about the lldb-commits mailing list