| Previous | Next |
| STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY | STATUS_HEAP_CORRUPTION |
STATUS_FAILED_STACK_SWITCH
A required stack switch could not be completed
Some low-level transitions need execution to move to a different stack, for example while entering a protected callback, exception, or runtime-managed context. This status reports that Windows could not allocate enough memory to perform that switch. It is therefore different from a normal function exhausting its existing stack, although memory pressure or damaged stack state may be related.
The public NTSTATUS definition does not identify which subsystem requested the switch. Diagnosis should begin with the call stack and the immediately preceding transition rather than assuming fibers, callbacks, or one specific runtime. If the failure follows other commitment-limit or allocation errors, preserve that sequence; the earlier resource failure may explain why the stack-switch path could not establish its working stack.
What to inspect
- Capture the caller and transition that requested the alternate stack.
- Check system commit pressure and preceding allocation failures.
- Validate the current stack pointer before blaming the alternate stack allocation.
- Do not retry in a tight loop when the process is already resource constrained.
References
- Microsoft Open Specifications: NTSTATUS values
- Microsoft Windows SDK metadata: ntstatus.h
- Microsoft Learn: Thread Stack Size
- Microsoft Learn: Exception Dispatching
Looking for a different code? Search another status or error code.
