note that alloca can't report error.

from OpenBSD.
This commit is contained in:
yamt 2002-08-10 16:55:18 +00:00
parent 14e693f16b
commit 120c9b3256
1 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: alloca.3,v 1.9 2002/02/07 07:00:27 ross Exp $
.\" $NetBSD: alloca.3,v 1.10 2002/08/10 16:55:18 yamt Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -33,7 +33,7 @@
.\"
.\" from: @(#)alloca.3 8.1 (Berkeley) 6/4/93
.\"
.Dd June 4, 1993
.Dd August 11, 2002
.Dt ALLOCA 3
.Os
.Sh NAME
@ -72,6 +72,18 @@ The
.Fn alloca
function
is machine dependent; its use is discouraged.
.Pp
The
.Fn alloca
function is slightly unsafe because it cannot ensure that the pointer
returned points to a valid and usable block of memory.
The allocation made may exceed the bounds of the stack, or even go
further into other objects in memory, and
.Fn alloca
cannot determine such an error.
Avoid
.Fn alloca
with large unbounded allocations.
.\" .Sh HISTORY
.\" The
.\" .Fn alloca