On 28 Aug 2014, at 00:59, Gregory Casamento <[email protected]> wrote:
> You could dereference a nil pointer on purpose. Make sure you set lots > properly to allow it to produce a core file. This is a bad idea. The compiler will often remove this code, because it knows that it has undefined behaviour and so it's free to do anything it wants (including just removing the load / store operation). The simplest thing to do is __builtin_trap(), which (with gcc or clang) will expand to an illegal instruction (ud2 on x86), which will cause an illegal instruction trap and then an illegal instruction signal to be delivered to the process. The default action on receiving SIGILL is to drop core. David -- Sent from my Cray X1 _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
