From 7820bd1e52167367edd9ec269cd8a89095756eb1 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 7 Jul 2012 01:24:12 +0000 Subject: Fixed a crasher where the section load list was not thread safe. llvm-svn: 159884 --- lldb/source/Core/Module.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Core/Module.cpp') diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index d7f185442a1..ee01dfe3f30 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -1135,11 +1135,11 @@ Module::SetLoadAddress (Target &target, lldb::addr_t offset, bool &changed) // 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(); + SectionSP section_sp (section_list->GetSectionAtIndex (sect_idx)); // Only load non-thread specific sections when given a slide - if (section && !section->IsThreadSpecific()) + if (section_sp && !section_sp->IsThreadSpecific()) { - if (target.GetSectionLoadList().SetSectionLoadAddress (section, section->GetFileAddress() + offset)) + if (target.GetSectionLoadList().SetSectionLoadAddress (section_sp, section_sp->GetFileAddress() + offset)) ++num_loaded_sections; } } -- cgit v1.2.3