From 2bdf85ee50d1b808a06b1c5b3fcb97edb4a03585 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Wed, 11 Apr 2018 08:51:54 +0100 Subject: [PATCH] Add missing isa pointer. This test was accidentally passing sometimes, with the isa pointer being set using some bit of memory in inter-object padding. This breaks horribly with an allocator that packs objects densely. --- Test/setSuperclass.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Test/setSuperclass.m b/Test/setSuperclass.m index 236eff3..8d77564 100644 --- a/Test/setSuperclass.m +++ b/Test/setSuperclass.m @@ -5,7 +5,11 @@ #pragma clang diagnostic ignored "-Wdeprecated-declarations" __attribute__((objc_root_class)) -@interface Root @end +@interface Root +{ + id isa; +} +@end @interface DefaultSuperclass: Root @end // test: new superclass when not initialized at the time of class_setSuperclass