[Lldb-commits] [lldb] r200951 - Lock the JIT before using it.
Sean Callanan
scallanan at apple.com
Thu Feb 6 14:25:20 PST 2014
Author: spyffe
Date: Thu Feb 6 16:25:20 2014
New Revision: 200951
URL: http://llvm.org/viewvc/llvm-project?rev=200951&view=rev
Log:
Lock the JIT before using it.
<rdar://problem/15958296>
Modified:
lldb/trunk/source/Expression/IRExecutionUnit.cpp
Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=200951&r1=200950&r2=200951&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Thu Feb 6 16:25:20 2014
@@ -238,6 +238,8 @@ IRExecutionUnit::GetRunnableInfo(Error &
{
lldb::ProcessSP process_sp(GetProcessWP().lock());
+ static Mutex s_runnable_info_mutex(Mutex::Type::eMutexTypeRecursive);
+
func_addr = LLDB_INVALID_ADDRESS;
func_end = LLDB_INVALID_ADDRESS;
@@ -256,6 +258,8 @@ IRExecutionUnit::GetRunnableInfo(Error &
return;
};
+ Mutex::Locker runnable_info_mutex_locker(s_runnable_info_mutex);
+
m_did_jit = true;
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
More information about the lldb-commits
mailing list