Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation software engineering and architecture

Stack overflow

Also known as: Stack exhaustion

German: Stapelspeicherüberlauf

In programming, a stack overflow is an error in which a program uses more stack memory than is reserved for it, for example through deep recursion or large local variables, overwriting adjacent memory or triggering an exception.

  • Software engineering

In one sentence

A stack overflow occurs when a program uses more stack memory than reserved, for example through deep recursion or large local data.

Example

A recursive search function in the gateway firmware overflows its task stack for a very long configuration list, and the device resets.

How it applies

  • Engineering: Embedded coding guidelines restrict recursion and large local variables. Stack sizes per task are set from analysis or measurement with a safety margin.
  • Verification: Worst-case stack analysis by static tools, stack painting and run-time monitoring detect insufficient stack sizes before they cause field failures.
  • Documentation: Where users influence stack use, for example through nested function block calls in PLC code, the manual should state limits and the diagnostic shown on overflow.

Stack overflow vs. buffer overflow

A stack overflow exceeds the whole stack area. A Buffer overflow writes past the end of one buffer, which may be on the stack or elsewhere; buffer overflows are also a classic security vulnerability.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Blog editorial definition, based on embedded programming practice

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Blog and are not part of any standard.

Seen a mistake? Send us a note!