Ways for an unmanaged Windows process to crash?

爷,独闯天下 提交于 2019-12-13 16:09:14

问题


I am trying to understand the ways in which an unmanaged user-mode Windows process can "crash" (which is really too much of a catch-all term).

Here are the ways I know of so far:

  • Unhandled Structured Exception
    • Default UnhandledExceptionFilter: postmortem debugger in pre-Vista; WerFault in Vista+
    • Custom UnhandledExceptionFilter: may do whatever it likes, including exiting quietly?
  • "Hard" crash (not sure if there's a technical term for this)
    • E.g. hitting the stack overflow guard page while handling a stack overflow: the OS simply makes the process disappear without a trace?
  • "Normal" exit:
    • E.g. where the language provides its own error handling mechanism that makes a fatal crash look to the OS like the application has shut down normally.

Is this roughly right? Are there any other ways for a user-mode Windows process to die?


回答1:


  • Unhandled exception - this is usually what people would call "crash"
  • Exception with corrupted stack - if the stack is corrupted and the exception chain cannot be walked, the process is silently killed.
  • Explicit termination
    • From another process (e.g. TaskManager, kill.exe) calling TerminateProcess,
    • C/C++ runtime fatal error, /GS stack cookie corruption, etc.
  • Attaching a debugger and quiting the debugger without detaching
  • Console application will terminate if you kill the corresponding conhost.exe process


来源:https://stackoverflow.com/questions/3613108/ways-for-an-unmanaged-windows-process-to-crash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!