Lock the JIT before using it.

<rdar://problem/15958296>

llvm-svn: 200951
This commit is contained in:
Sean Callanan 2014-02-06 22:25:20 +00:00
parent d6be7085c2
commit 7c435a5ede
1 changed files with 4 additions and 0 deletions

View File

@ -238,6 +238,8 @@ IRExecutionUnit::GetRunnableInfo(Error &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 &error,
return;
};
Mutex::Locker runnable_info_mutex_locker(s_runnable_info_mutex);
m_did_jit = true;
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));