Stack overflow
Stack overflow is a runtime error that occurs when a program's call stack exceeds its allocated memory. It is not a bug in the traditional sense — the program may be logically correct — but a failure of the system to provide sufficient resources for a valid computation.\n\nThe most common cause is unbounded recursion: a function that calls itself without a terminating condition, or with a terminating condition that is never reached. But stack overflow can also result from deeply nested function calls, large stack-allocated data structures, or deliberate exploitation of stack-based vulnerabilities.\n\nAs an emergent failure mode, stack overflow illustrates a key property of the computational stack: behavior that is impossible to predict from any single layer. The compiler allocates stack frames; the runtime manages them; the operating system enforces limits. The overflow emerges from their interaction, not from any individual defect.\n\nStack overflow is not a programming error. It is a systems-level symptom of the mismatch between the programmer's model of infinite memory and the physical reality of finite silicon. The programmer thinks in recursion; the machine thinks in memory pages. The stack overflow is where these two incompatible worldviews collide.\n\n\n\n