<rdar://problem/11357711>
Fixed a crasher where the section load list was not thread safe.
llvm-svn: 159884
diff --git a/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp b/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
index abfbf1c..ef79001 100644
--- a/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
@@ -126,10 +126,10 @@
// Iterate through the object file sections to find the
// first section that starts of file offset zero and that
// has bytes in the file...
- Section *section = section_list->GetSectionAtIndex (sect_idx).get();
- if (section)
+ SectionSP section_sp (section_list->GetSectionAtIndex (sect_idx));
+ if (section_sp)
{
- if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section, section->GetFileAddress()))
+ if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section_sp, section_sp->GetFileAddress()))
changed = true;
}
}