mib updated this revision to Diff 536514. mib edited the summary of this revision. mib added a comment.
Address @JDevlieghere comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154271/new/ https://reviews.llvm.org/D154271 Files: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h lldb/source/Target/Process.cpp Index: lldb/source/Target/Process.cpp =================================================================== --- lldb/source/Target/Process.cpp +++ lldb/source/Target/Process.cpp @@ -2467,6 +2467,7 @@ } void Process::LoadOperatingSystemPlugin(bool flush) { + std::lock_guard<std::recursive_mutex> guard(m_thread_mutex); if (flush) m_thread_list.Clear(); m_os_up.reset(OperatingSystem::FindPlugin(this, nullptr)); Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h =================================================================== --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -421,7 +421,7 @@ bool m_session_is_active; bool m_pty_secondary_is_open; bool m_valid_session; - uint32_t m_lock_count; + std::atomic<uint32_t> m_lock_count; PyThreadState *m_command_thread_state; };
Index: lldb/source/Target/Process.cpp =================================================================== --- lldb/source/Target/Process.cpp +++ lldb/source/Target/Process.cpp @@ -2467,6 +2467,7 @@ } void Process::LoadOperatingSystemPlugin(bool flush) { + std::lock_guard<std::recursive_mutex> guard(m_thread_mutex); if (flush) m_thread_list.Clear(); m_os_up.reset(OperatingSystem::FindPlugin(this, nullptr)); Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h =================================================================== --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -421,7 +421,7 @@ bool m_session_is_active; bool m_pty_secondary_is_open; bool m_valid_session; - uint32_t m_lock_count; + std::atomic<uint32_t> m_lock_count; PyThreadState *m_command_thread_state; };
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits