summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2012-11-08 00:19:28 +0000
committerJason Molenda <jmolenda@apple.com>2012-11-08 00:19:28 +0000
commitc56bd0837378f15bbc652288c347f1cdb2b5ce8e (patch)
treef396504176b6eabba97b3ed779699ab715699276 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parent1cb5951a2f55b3aad85cd18b391ec62375d2e6bf (diff)
downloadbcm5719-llvm-c56bd0837378f15bbc652288c347f1cdb2b5ce8e.tar.gz
bcm5719-llvm-c56bd0837378f15bbc652288c347f1cdb2b5ce8e.zip
Fix a crasher in
DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule where it assumed that a kernel had been found in memory, when that may not be the case when we're attaching to a device early in the boot process. <rdar://problem/12638140> llvm-svn: 167564
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 739a46a7be2..3863762a276 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -264,7 +264,8 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule (
uuid = memory_module_sp->GetUUID();
uuid_is_valid = uuid.IsValid();
}
- if (memory_module_sp->GetObjectFile()
+ if (memory_module_sp
+ && memory_module_sp->GetObjectFile()
&& memory_module_sp->GetObjectFile()->GetType() == ObjectFile::eTypeExecutable
&& memory_module_sp->GetObjectFile()->GetStrata() == ObjectFile::eStrataKernel)
{
OpenPOWER on IntegriCloud