Building with LLVM and any optimization causes app to crash on startup

烂漫一生 提交于 2019-11-27 20:49:25

Upgrade to Xcode 4.0.2.

It fixed this issue (crash on launch for ARMv6 but not ARMv7 with optimization turned on) for us.

We've had the same issue with our app. It only affected armv6 code in Release/Distribution builds and thus only the iPhone 3G and the iPod Touch 2G. But contrary to your description, it was reproducible with XCode (we don't use xcodebuild).

Obviously the generated code corrupts the stack pointer. As a consequence, you can't really debug it and the crash logs are worthless. With the debugger, it could stop at viewWillAppear:animated of the first view that should be displayed. But quickly after that, the app always crashed.

Switching to an older compiler solved the problem.

I've filed a bug with Apple. Please file one too as it is said to increase the priority of the bug.

There are more people reporting the same problem:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!