Provoke an unhandled exception

I want to test a bunch of "crash dump generators" like good old Dr. Watson .

What's the easiest way to trigger an application to crash on an unhandled exception in C / C ++?

+3


source to share


1 answer


When technically dereferencing a pointer, NULL

this is just undefined behavior and not a guaranteed crash, in practice it will crash with almost absolute certainty:



(*((int*)0))=0;

      

+3


source







All Articles