On the x86 (Pentium and later I think), you can also use the debug registers. See unsupported/x86/nullpointer.c for an example.