stack overflow

term

programming

Exhausting the call stack, usually through recursion that never reaches its base case.

Worth keeping distinct from a buffer overflow on the stack, which is a different bug with a similar-sounding name. Here nothing is overwritten maliciously, the stack simply hits its limit and the process dies, typically with a stack overflow exception or a segmentation fault. The fix is almost always algorithmic, a missing termination condition or converting deep recursion to iteration, and it is the bug that gave the famous programming site its name.

Also known as: stack exhaustion, infinite recursion

All glossary entries