Homonym: stack overflow (Error)
A stack overflow occurs when a program uses more memory on the call stack than is allocated. The call stack is a special area of memory that stores information about active subroutines or functions, including local variables and return addresses. When too many functions are called, or when a function calls itself recursively without a proper exit condition, the stack can exceed its limit, leading to an overflow.
This overflow can cause the program to crash or behave unexpectedly. It is often associated with programming errors, such as infinite recursion or excessive function calls. Developers can prevent stack overflow by optimizing code and ensuring that recursive functions have a clear base case.