EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0) [英] EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
问题描述
我真的不知道为什么有这个错误.
I really can't figure out why I have this bug.
首先调试器在机器代码处停止
First of all the debugger stop at machine code
该线程也没有显示任何内容.程序实际上没有代码停止
The thread also shows nothing. The program stop at no code actually
所以它与_dispatch_worker_thread有关
So it has something to do with _dispatch_worker_thread
那是什么?
以任何方式我可以调试它吗?我应该回滚吗?
Any way how I can debug this? Should I just rollback?
推荐答案
当您运行CPU不支持的(vector)扩展名时,会发生这种崩溃.
This kind of crash will happen when you are running a (vector)extension which is not supported on your CPU.
例如,在xcode 5中的项目设置/构建设置/代码生成"下,将 启用附加的矢量扩展名"到"AVX2".生成可执行文件.
For example, in xcode 5 under "project-settings / build-settings / Code Generation, set the "Enable Additional Vector extensions" to "AVX2". Build your executable.
现在在以下位置运行它:
Now run it on an:
- Intel Core i5:使用"exc_i386_invop子代码= 0x0"时,它将崩溃(无论编译器决定使用avx2).
- 英特尔酷睿i7:它将运行.
这篇关于EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!