Since gcc r204414 tst-cleanup2 & tst-cleanupx2 fail: Attempting to sprintf to null ptr Didn't expect signal from child: got `Illegal instruction'
GCC now has the ability to replace a NULL pointer dereference with a trap instruction. This is useful in a variety of contexts as a path with a NULL pointer dereference is not standards conformant. My recommendation would be to first test if -fno-isolate-erroneous-paths exists as an option and use it for that test.
I think you should leave the *0 in gcc, because you'll break all programs that have a custom handler otherwise. For example Xorg also breaks without -fno-isolate-erroneous-paths on my machine: ... [ 59279.226] (EE) Illegal instruction at address 0x452dc0 [ 59279.232] (EE) Fatal server error: [ 59279.244] (EE) Caught signal 4 (Illegal instruction). Server aborting
Fixed by c8b82b81ded53ae06987727e807d19170bee4204.