8 objc\[\d+\]: Method cache corrupted.*
13 objc\[\d+\]: Method cache corrupted.*
21 // Test objc_msgSend's detection of infinite loops during cache scan.
27 testwarn("objc_msgSend on arm doesn't detect infinite loops");
28 fprintf(stderr, "arm\n");
37 typedef uint32_t mask_t;
39 typedef uint16_t mask_t;
48 struct bucket_t *buckets;
59 @interface Subclass : TestRoot @end
60 @implementation Subclass @end
64 Class cls = [TestRoot class];
68 struct cache_t *cache = &((__bridge struct class_t *)cls)->cache;
71 struct bucket_t *buckets = (struct bucket_t *)calloc(sizeof(struct bucket_t), COUNT+1);
72 for (int i = 0; i < COUNT; i++) {
76 buckets[COUNT].sel = 1;
77 buckets[COUNT].imp = (uintptr_t)buckets;
79 cache->mask = COUNT-1;
81 cache->buckets = buckets;
83 fprintf(stderr, "crash now\n");
86 fail("should have crashed");