diff options
author | Sean Callanan <scallanan@apple.com> | 2014-02-06 22:25:20 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2014-02-06 22:25:20 +0000 |
commit | 7c435a5ede460ef8e060f0bcb0aba8064137f922 (patch) | |
tree | ce99c288f3979156a3e97f82242b79bfdde31604 /lldb/source/Expression/IRExecutionUnit.cpp | |
parent | d6be7085c2dcca5e3e3ec5b7f2857502206197d1 (diff) | |
download | bcm5719-llvm-7c435a5ede460ef8e060f0bcb0aba8064137f922.tar.gz bcm5719-llvm-7c435a5ede460ef8e060f0bcb0aba8064137f922.zip |
Lock the JIT before using it.
<rdar://problem/15958296>
llvm-svn: 200951
Diffstat (limited to 'lldb/source/Expression/IRExecutionUnit.cpp')
-rw-r--r-- | lldb/source/Expression/IRExecutionUnit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp index 4d5c78e19b5..17bd03ae6cb 100644 --- a/lldb/source/Expression/IRExecutionUnit.cpp +++ b/lldb/source/Expression/IRExecutionUnit.cpp @@ -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)); |