Comment Re:News flash (Score 1) 470
If you want a "this cannot happen" with core dump in C, just use abort(). Unless its behaviour is specifically overriden, it's specified to exit the program as unsuccessful termination by the C standards (e.g. 7.22.4.1p2 of C11), and to core dump by POSIX (about as portable as you can get where core dumps are concerned; in straight C, they might not necessarily exist). It also has the benefit of being pretty short, and not undefined behaviour at all.
Of course, that doesn't work in the kernel, but then neither would the other methods you suggested.