[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How does string.format handle undefined behavior?
- From: Viacheslav Usov <via.usov@...>
- Date: Tue, 7 Sep 2021 21:18:50 +0200
On Mon, Sep 6, 2021 at 3:50 PM Roberto Ierusalimschy
> A small illustration: as far as I can find, the standard says nothing
> about the possibility of a stack overflow due to too many pending
> calls. There is no way to check it, there is no ensured minimum,
> it is not defined as undefined, nothing.
Upon reflecting on it, a program can have arbitrarily deep call chains
without causing undefined behavior, but in doing so it is likely to
cause implementation-defined behavior, wherein a signal will be sent
to the program that it will most likely be unable to dismiss. "The
complete set of signals, their semantics, and their default handling