summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-07-07 01:24:12 +0000
committerGreg Clayton <gclayton@apple.com>2012-07-07 01:24:12 +0000
commit7820bd1e52167367edd9ec269cd8a89095756eb1 (patch)
treeb05cc6d2041de6086f66657510ea3fe5da8dcb63 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parent9407302d37cdcb8f2b3a64e956b495f4ec746887 (diff)
downloadbcm5719-llvm-7820bd1e52167367edd9ec269cd8a89095756eb1.tar.gz
bcm5719-llvm-7820bd1e52167367edd9ec269cd8a89095756eb1.zip
<rdar://problem/11357711>
Fixed a crasher where the section load list was not thread safe. llvm-svn: 159884
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 279bc85f438..7800a977db4 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -252,13 +252,13 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule (
uint32_t num_sections_loaded = 0;
for (sect_idx=0; sect_idx<num_ondisk_sections; ++sect_idx)
{
- const Section *ondisk_section = ondisk_section_list->GetSectionAtIndex(sect_idx).get();
- if (ondisk_section)
+ SectionSP ondisk_section_sp(ondisk_section_list->GetSectionAtIndex(sect_idx));
+ if (ondisk_section_sp)
{
- const Section *memory_section = memory_section_list->FindSectionByName(ondisk_section->GetName()).get();
+ const Section *memory_section = memory_section_list->FindSectionByName(ondisk_section_sp->GetName()).get();
if (memory_section)
{
- target.GetSectionLoadList().SetSectionLoadAddress (ondisk_section, memory_section->GetFileAddress());
+ target.GetSectionLoadList().SetSectionLoadAddress (ondisk_section_sp, memory_section->GetFileAddress());
++num_sections_loaded;
}
}
OpenPOWER on IntegriCloud