| Previous | Next |
| ERROR_NOT_TINY_STREAM | ERROR_CONVERT_TO_LARGE |
ERROR_STACK_OVERFLOW_READ
What ERROR_STACK_OVERFLOW_READ means
This status is associated with exhausted or corrupted thread stack state. Once the normal stack is depleted, even diagnostic and cleanup code can fail because it needs additional stack space.
Where it commonly appears
- Deep or unbounded recursion
- Large stack allocations in nested call paths
- Exception handling after stack corruption
- Parser, tree-walk, or callback code operating on adversarial input
Likely causes
- Recursive input was not bounded
- A local array or structure consumed excessive stack space
- Stack memory was overwritten by a buffer bug
- Exception handling re-entered the failing path
- A thread was created with an unusually small stack reserve
Diagnostic checklist
- Capture a dump immediately; later handling may destroy the useful stack
- Inspect recursion depth and repeated frames
- Review large local variables and alloca-style allocations
- Enable compiler and runtime protections in a reproducer
- Test malformed or cyclic input that can trigger unbounded traversal
Guidance for developers
Move large buffers to bounded heap storage, convert recursion to iteration where practical, and enforce depth limits before descending. Keep stack-overflow handlers minimal and avoid complex logging on the exhausted stack. Do not continue normal execution after suspected stack corruption.
Guidance for administrators
For a third-party application, collect the crash dump and input that triggered the problem. Increasing the thread stack can hide symptoms but is not a safe fix for infinite recursion or memory corruption.
Example incident
A document parser recursively expands nested objects without a depth limit. A crafted file exhausts the worker stack, and a subsequent read during exception dispatch reports this code. A strict nesting limit addresses both reliability and denial-of-service risk.
Related conditions
Compare with ERROR_STACK_OVERFLOW and access-violation exceptions. The exact surfaced code depends on where the system detects the exhausted or invalid stack state.
Operational decision points
Reliable diagnosis starts from a stack safety condition and not merely a transient API failure. For ERROR_STACK_OVERFLOW_READ, the deciding evidence is dump, recursion depth, repeated frames, reserve size, triggering input. Preserve this first-occurrence evidence before retrying.
- State change required: the next attempt is justified only after the relevant stack safety state can differ from the failed attempt.
- Escalation evidence: preserve dump, recursion depth, repeated frames, reserve size, triggering input together with component version and the first preceding failure.
References
Looking for a different code? Search another status or error code.