8 objc\[\d+\]: Method cache corrupted.*
13 objc\[\d+\]: Method cache corrupted\.
14 CRASHED: SIG(ILL|TRAP)
21 #if !__OBJC2__ || __arm__
25 fprintf(stderr, "objc1\n");
34 typedef uint32_t mask_t;
36 typedef uint16_t mask_t;
45 struct bucket_t *buckets;
56 @interface Subclass : TestRoot @end
57 @implementation Subclass @end
61 Class cls = [TestRoot class];
65 struct cache_t *cache = &((__bridge struct class_t *)cls)->cache;
68 struct bucket_t *buckets = calloc(sizeof(struct bucket_t), COUNT+1);
69 for (int i = 0; i < COUNT; i++) {
73 buckets[COUNT].sel = 1;
74 buckets[COUNT].imp = (uintptr_t)buckets;
76 cache->mask = COUNT-1;
78 cache->buckets = buckets;
80 fprintf(stderr, "crash now\n");
83 fail("should have crashed");