A Fail Fast Exception is a type of Exception made by User Mode applications.
The Exception Code is 0xC0000409 (a.k.a. STATUS_FAIL_FAST_EXCEPTION).
The first Exception Parameter (0) defines the Sub-Code. Some sub-codes use additional Exception Parameters to specify additional detail.
Unlike all other exception codes, Fail Fast Exceptions bypass all exception handlers (frame or vector based). Raising this exception terminates the application and invokes Windows Error Reporting, if Windows Error Reporting is enabled.
The Exception Code was initially designed to raise a security check failure. Specifically, Guard Segment (/GS) violations. Over time, the desire to have an immediate termination ability was leveraged by applications for non-security reasons. These applications leverage the first parameter to specify the scenario (a sub-code). The original "security check failure" use-case is reserved with a value of 0.
The Exception Parameter values are currently not defined due to the per-application nature.
- Inside - .exr
- Inside - Windows SDK
- MSDN - RaiseFailFastException function
- Microsoft Docs - Debugging Tools for Windows
- Microsoft Docs - !gs command
- Microsoft Docs - Compiler Option - /GS (Buffer Security Check)
- Microsoft Docs - Compiler Option - /Gs (Control Stack Checking Calls)