<rdar://problem/11398693> Making sure we do not attempt to run code on zombie objects when attempting to format them

llvm-svn: 164156
This commit is contained in:
Enrico Granata 2012-09-18 18:34:14 +00:00
parent 09adf3decc
commit 5d31103974
1 changed files with 5 additions and 3 deletions

View 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>'