diff options
author | Greg Clayton <gclayton@apple.com> | 2012-07-07 01:24:12 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-07-07 01:24:12 +0000 |
commit | 7820bd1e52167367edd9ec269cd8a89095756eb1 (patch) | |
tree | b05cc6d2041de6086f66657510ea3fe5da8dcb63 /lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp | |
parent | 9407302d37cdcb8f2b3a64e956b495f4ec746887 (diff) | |
download | bcm5719-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/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp')
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index c42f469fea6..3fd2c2d1e12 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -390,15 +390,15 @@ DynamicLoaderMacOSXDYLD::UpdateCommPageLoadAddress(Module *module) uint32_t num_sections = section_list->GetSize(); for (uint32_t i=0; i<num_sections; ++i) { - Section* section = section_list->GetSectionAtIndex (i).get(); - if (section) + SectionSP section_sp (section_list->GetSectionAtIndex (i)); + if (section_sp) { - const addr_t new_section_load_addr = section->GetFileAddress (); - const addr_t old_section_load_addr = m_process->GetTarget().GetSectionLoadList().GetSectionLoadAddress (section); + const addr_t new_section_load_addr = section_sp->GetFileAddress (); + const addr_t old_section_load_addr = m_process->GetTarget().GetSectionLoadList().GetSectionLoadAddress (section_sp); if (old_section_load_addr == LLDB_INVALID_ADDRESS || old_section_load_addr != new_section_load_addr) { - if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section, section->GetFileAddress ())) + if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section_sp, section_sp->GetFileAddress ())) changed = true; } } @@ -453,11 +453,11 @@ DynamicLoaderMacOSXDYLD::UpdateImageLoadAddress (Module *module, DYLDImageInfo& // "Section" objects, and "true" for all other sections. const bool warn_multiple = section_sp->GetName() != g_section_name_LINKEDIT; - const addr_t old_section_load_addr = m_process->GetTarget().GetSectionLoadList().GetSectionLoadAddress (section_sp.get()); + const addr_t old_section_load_addr = m_process->GetTarget().GetSectionLoadList().GetSectionLoadAddress (section_sp); if (old_section_load_addr == LLDB_INVALID_ADDRESS || old_section_load_addr != new_section_load_addr) { - if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section_sp.get(), new_section_load_addr, warn_multiple)) + if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section_sp, new_section_load_addr, warn_multiple)) changed = true; } } @@ -530,7 +530,7 @@ DynamicLoaderMacOSXDYLD::UnloadImageLoadAddress (Module *module, DYLDImageInfo& if (section_sp) { const addr_t old_section_load_addr = info.segments[i].vmaddr + info.slide; - if (m_process->GetTarget().GetSectionLoadList().SetSectionUnloaded (section_sp.get(), old_section_load_addr)) + if (m_process->GetTarget().GetSectionLoadList().SetSectionUnloaded (section_sp, old_section_load_addr)) changed = true; } else |