[Lldb-commits] [lldb] [lldb] Fix data race in statusline format handling (PR #142489)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 2 14:26:33 PDT 2025
================
@@ -380,11 +380,11 @@ bool OptionValue::SetLanguageValue(lldb::LanguageType new_language) {
return false;
}
-const FormatEntity::Entry *OptionValue::GetFormatEntity() const {
+FormatEntity::Entry OptionValue::GetFormatEntity() const {
std::lock_guard<std::mutex> lock(m_mutex);
if (const OptionValueFormatEntity *option_value = GetAsFormatEntity())
- return &option_value->GetCurrentValue();
- return nullptr;
+ return option_value->GetCurrentValue();
----------------
adrian-prantl wrote:
This looks safe.
https://github.com/llvm/llvm-project/pull/142489
More information about the lldb-commits
mailing list