[PATCH v2 3/5] alloca.3: clarify reasoning for no error return in BUGS

наб
2021-09-14T12:41:21Z

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

A stack lasts from some high point until it runs off the back
of the pages allocated, making detecting errors impossible,
save for actually trying to access said unallocated page

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
man3/alloca.3 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/man3/alloca.3 b/man3/alloca.3
index 71348e609..20761b079 100644
--- a/man3/alloca.3
+++ b/man3/alloca.3
@@ -163,10 +163,11 @@ The inlined code often consists of a single instruction adjusting
the stack pointer, and does not check for stack overflow.
Thus, there is no NULL error return.
.SH BUGS
-There is no error indication if the stack frame cannot be extended.
-(However, after a failed allocation, the program is likely to receive a
+Due to the nature of the stack, it is impossible to check if the allocation
+would overflow the space available, and, hence, neither is indicating an error.
+(However, the program is likely to receive a
.B SIGSEGV
-signal if it attempts to access the unallocated space.)
+signal if it attempts to access unavailable space.)
.PP
On many systems
.BR alloca ()
--
2.20.1