Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: Has "stack overflow" specified behavior?
Date: Thu, 16 Dec 2021 20:10:39 -0800
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <86k0g33m80.fsf@linuxsc.com>
References: <86czm05exm.fsf@linuxsc.com> <86a6h04pwl.fsf@linuxsc.com> <0f0a9266-6f5c-40a8-abe7-83b771f64395n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="80deed38cb7e1387fac9e84aa4dded6e"; logging-data="13626"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hhP9DpA+hZAsd7OwgEiQ3b/kvG5P94kY="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:G06+6/nccL3fuqFSUH4SiUGBF+4= sha1:KL7jFQL9iP5RwARZR3AHzYUDOGc=
Xref: csiph.com comp.lang.c++:82673
wij writes:
[...]
> By the way, I though the 'stack' still must exist no matter how it
> is implemented. [...]
Some sort of machinery with stack-like behavior must be there, to
support recursive calls if nothing else. But there doesn't have
to be a "stack" in the sense of a fixed, contiguous region of
memory that is used exclusively for state local to each call of a
function. Other ways of providing function-local state have been
used, and depending on the operating environment they can be
practical, feasible, or even preferable.