[Lldb-commits] [PATCH] D157041: [lldb] Protect OptionValue accesses from data races

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 3 16:22:10 PDT 2023


kastiglione added inline comments.


================
Comment at: lldb/source/Interpreter/OptionValue.cpp:41
                                 llvm::StringRef value) {
+  std::lock_guard<std::recursive_mutex> lock(m_mutex);
   Status error;
----------------
this one doesn't need a lock


================
Comment at: lldb/source/Interpreter/OptionValue.cpp:393
 
 std::optional<lldb::Format> OptionValue::GetFormatValue() const {
   if (const OptionValueFormat *option_value = GetAsFormat())
----------------
this one doesn't have a lock, should it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157041



More information about the lldb-commits mailing list