From 641de41cb433d618c7c8eae32f9dcab800758129 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Fri, 7 Dec 2012 03:38:23 +0000 Subject: [PATCH] When using the same-device optimization for shared cache libraries, if we have an invalid load address for __LINKEDIT, don't try to read anything out of lldb's own address space. Reading it out of the remote address space will fail gracefully if we have bad addresses but reading it out of lldb's own address space will result in a crash. llvm-svn: 169582 --- lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 4d6d007..936c1e9 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1326,7 +1326,7 @@ ObjectFileMachO::ParseSymtab (bool minimize) // data across can slow down debug launch times, so we optimize this by // reading the memory for the __LINKEDIT section from this process. PlatformSP platform_sp (target.GetPlatform()); - if (platform_sp && platform_sp->IsHost()) + if (platform_sp && platform_sp->IsHost() && linkedit_load_addr != LLDB_INVALID_ADDRESS) { data_was_read = true; nlist_data.SetData((void *)symoff_addr, nlist_data_byte_size, eByteOrderLittle); -- 2.7.4