forked from OSchip/llvm-project
Added a mutex to the call frame info to guard
generation of the FDE index. <rdar://problem/11813705> llvm-svn: 160099
This commit is contained in:
parent
d2aabd3bb2
commit
7d69f12e75
|
@ -18,6 +18,7 @@
|
|||
#include "lldb/Core/AddressRange.h"
|
||||
#include "lldb/Core/VMRange.h"
|
||||
#include "lldb/Core/dwarf.h"
|
||||
#include "lldb/Host/Mutex.h"
|
||||
#include "lldb/Symbol/UnwindPlan.h"
|
||||
#include "lldb/Symbol/ObjectFile.h"
|
||||
|
||||
|
@ -128,6 +129,7 @@ private:
|
|||
|
||||
std::vector<FDEEntry> m_fde_index;
|
||||
bool m_fde_index_initialized; // only scan the section for FDEs once
|
||||
Mutex m_fde_index_mutex; // and isolate the thread that does it
|
||||
|
||||
bool m_is_eh_frame;
|
||||
|
||||
|
|
|
@ -293,9 +293,14 @@ DWARFCallFrameInfo::GetFDEIndex ()
|
|||
{
|
||||
if (m_section_sp.get() == NULL || m_section_sp->IsEncrypted())
|
||||
return;
|
||||
|
||||
if (m_fde_index_initialized)
|
||||
return;
|
||||
|
||||
Mutex::Locker locker(m_fde_index_mutex);
|
||||
|
||||
if (m_fde_index_initialized) // if two threads hit the locker
|
||||
return;
|
||||
|
||||
dw_offset_t offset = 0;
|
||||
if (m_cfi_data_initialized == false)
|
||||
|
|
Loading…
Reference in New Issue