Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

Tags:

I really can't figure out why I have this bug.

First of all the debugger stop at machine code

enter image description here

The thread also shows nothing. The program stop at no code actually

enter image description here

So it has something to do with _dispatch_worker_thread

What is that?

Any way how I can debug this? Should I just rollback?

like image 868
user4951 Avatar asked May 24 '12 09:05

user4951


1 Answers

This kind of crash will happen when you are running a (vector)extension which is not supported on your CPU.

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: it's going to crash (wherever the compiler decided to use avx2) with 'exc_i386_invop subcode=0x0'.
  • Intel Core i7: it will work.
like image 84
kalmiya Avatar answered Oct 07 '22 00:10

kalmiya