Author: spyffe
Date: Fri Dec 20 17:07:12 2013
New Revision: 197843

URL: http://llvm.org/viewvc/llvm-project?rev=197843&view=rev
Log:
Harden the Objective-C runtime against weird method
signatures.

<rdar://problem/15631996>

Modified:
    
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp?rev=197843&r1=197842&r2=197843&view=diff
==============================================================================
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
 Fri Dec 20 17:07:12 2013
@@ -528,6 +528,9 @@ AppleObjCTypeVendor::FinishDecl(clang::O
     
     auto instance_method_func = [log, interface_decl, this](const char *name, 
const char *types) -> bool
     {        
+        if (!name || !types)
+            return false; // skip this one
+
         ObjCRuntimeMethodType method_type(types);
         
         clang::ObjCMethodDecl *method_decl = method_type.BuildMethod 
(interface_decl, name, true);
@@ -543,6 +546,9 @@ AppleObjCTypeVendor::FinishDecl(clang::O
     
     auto class_method_func = [log, interface_decl, this](const char *name, 
const char *types) -> bool
     {
+        if (!name || !types)
+            return false; // skip this one
+        
         ObjCRuntimeMethodType method_type(types);
         
         clang::ObjCMethodDecl *method_decl = method_type.BuildMethod 
(interface_decl, name, false);


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to