当我尝试使用默认编译器设置LLVM GCC 4.2在设备上测试我的应用程序时,它给了我“内部编译器错误:总线错误”,但它与GCC 4.2和LLVM 编译器 2.0一起工作正常。
此错误的可能原因/原因是什么?是否可以使用 GCC 4.2 分发您的应用程序?
当我尝试使用默认编译器设置LLVM GCC 4.2在设备上测试我的应用程序时,它给了我“内部编译器错误:总线错误”,但它与GCC 4.2和LLVM 编译器 2.0一起工作正常。
此错误的可能原因/原因是什么?是否可以使用 GCC 4.2 分发您的应用程序?
"Bus error" usually means that your application is trying to perform an unaligned memory access, which is not allowed by default.
You can try either tell gcc
to generate only aligned memory accesses or set the unaligned memory access handling in the OS kernel (not sure whether it's possible in iOS):
echo 2 > /proc/cpu/alignment