@@ -214,17 +214,28 @@ { glue_objc_setPropertyStruct(dest, src, size, atomic, strong); } void -objc_enumerationMutation(id obj) +objc_enumerationMutation(id object) { - glue_objc_enumerationMutation(obj); + /* + * This does not use the glue code to hack around a compiler bug. + * + * When using the generated inline stubs, the compiler does not emit + * any frame information, making the unwind fail. As a result + * objc_enumerationMutation() might throw an exception that could never + * be caught. If, however, we're using a function pointer instead of + * the inline stub, the compiler does generate a frame and everything + * works fine. + */ + uintptr_t throw = (((uintptr_t)ObjFWRTBase) - 0x8A); + ((void (*)(id OBJC_M68K_REG("a0")))throw)(object); } int __gnu_objc_personality_v0(int version, int actions, uint64_t ex_class, void *ex, void *ctx) { return glue___gnu_objc_personality_v0(version, actions, &ex_class, ex, ctx); }