summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorjruoho <jruoho@NetBSD.org>2010-05-03 06:11:38 +0000
committerjruoho <jruoho@NetBSD.org>2010-05-03 06:11:38 +0000
commit49bb3cb02ecac28ddedf6ec515bf0855d866eb48 (patch)
treed11c4ccd57a6a788df3b876842e1dadeeb50c49b /lib/libc/stdlib
parent40c884b1c32de252be6f527bba28ca8d30bde676 (diff)
Note the problems with SSP.
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/alloca.320
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/libc/stdlib/alloca.3 b/lib/libc/stdlib/alloca.3
index 918ea078faf..e61c9274e11 100644
--- a/lib/libc/stdlib/alloca.3
+++ b/lib/libc/stdlib/alloca.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: alloca.3,v 1.12 2003/08/07 16:43:37 agc Exp $
+.\" $NetBSD: alloca.3,v 1.13 2010/05/03 06:11:38 jruoho Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)alloca.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd August 11, 2002
+.Dd May 3, 2010
.Dt ALLOCA 3
.Os
.Sh NAME
@@ -63,12 +63,15 @@ pointer is returned.
.Xr getpagesize 3 ,
.Xr malloc 3 ,
.Xr realloc 3
-.Sh BUGS
+.Sh CAVEATS
+Few limitations can be mentioned:
+.Bl -bullet
+.It
The
.Fn alloca
function
is machine dependent; its use is discouraged.
-.Pp
+.It
The
.Fn alloca
function is slightly unsafe because it cannot ensure that the pointer
@@ -80,6 +83,15 @@ cannot determine such an error.
Avoid
.Fn alloca
with large unbounded allocations.
+.It
+Since
+.Fn alloca
+modifies the stack at runtime,
+it causes problems to certain security features.
+See
+.Xr security 8
+for a discussion.
+.El
.\" .Sh HISTORY
.\" The
.\" .Fn alloca