<rdar://problem/11398693> Making sure we do not attempt to run code on zombie objects...
authorEnrico Granata <egranata@apple.com>
Tue, 18 Sep 2012 18:34:14 +0000 (18:34 +0000)
committerEnrico Granata <egranata@apple.com>
Tue, 18 Sep 2012 18:34:14 +0000 (18:34 +0000)
llvm-svn: 164156

lldb/examples/summaries/cocoa/objc_runtime.py

index 6289e0e..c48ecea 100644 (file)
@@ -104,9 +104,8 @@ class Utilities:
                        return class_data,wrapper
                if class_data.is_kvo():
                        class_data = class_data.get_superclass()
-               if class_data.is_valid() == 0:
-                       statistics.metric_hit('invalid_isa',valobj)
-                       wrapper = InvalidISA_Description()
+               if class_data.class_name() == '_NSZombie_OriginalClass':
+                       wrapper = ThisIsZombie_Description()
                        return class_data,wrapper
                return class_data,None
 
@@ -789,3 +788,6 @@ class InvalidISA_Description(SpecialSituation_Description):
        def message(self):
                return '<not an Objective-C object>'
 
+class ThisIsZombie_Description(SpecialSituation_Description):
+       def message(self):
+               return '<freed object>'
\ No newline at end of file