[Lldb-commits] [lldb] r162871 - /lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp

Sean Callanan scallanan at apple.com
Wed Aug 29 15:34:39 PDT 2012


Author: spyffe
Date: Wed Aug 29 17:34:39 2012
New Revision: 162871

URL: http://llvm.org/viewvc/llvm-project?rev=162871&view=rev
Log:
Fixed a potential crash in PlatformLinux if
ModuleList::GetSharedModule() returned NULL.

<rdar://problem/12182971>

Modified:
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=162871&r1=162870&r2=162871&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Wed Aug 29 17:34:39 2012
@@ -192,7 +192,8 @@
                                                  NULL,
                                                  NULL);
         
-            if (exe_module_sp->GetObjectFile() == NULL)
+            // TODO find out why exe_module_sp might be NULL            
+            if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL)
             {
                 exe_module_sp.reset();
                 error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain the architecture %s",





More information about the lldb-commits mailing list