So i have a code like this in a library to generate crash:
- (void)someMethod {
((void (*)(void)) NULL)();
}
When compiling it in xcode 8.2 it works fine and executing it results in a crash, but after migration to xcode 8.3 method doesn't behave the expected way anymore. After some investigation i've found out that machine code that is genretaed from this source code is different:
XCode ver. 8.3
-[MSCrashNXPage crash]:
00007658 nop
XCode ver. 8.2
-[MSCrashNXPage crash]:
00007638 trap
I figured out that this might be some optimizations that were introduced in new version, or something like this. So can you point out what can be done to restore the original behaviour?
Thanks.