Search code examples
windowscrash-dumps

Deliberately crashing an external process under Windows


I would like to synthesise a native code fault. This is so that we can see where in particular some debugging output gets put when that occurrs.

Pskill (from Sys-Internals) causes a graceful exit. DotCrash.exe doesn't seem to be available anymore from Microsoft directly.

Is there any way to externally cause a crash in a process?


Solution

  • I've done this before using windbg by:

    1. Starting the process
    2. Attaching to the process with windbg
    3. Setting a breakpoint on one of my app's functions
    4. Running the app until I hit the breakpoint
    5. In windbg setting a local variable to something that will cause an Access Violation (e.g. set a pointer to 0xFFFFFFFF or muck with the register values)
    6. hit f5 and the app should hopefully crash