diff options
author | mickey <> | 2003-02-12 06:49:04 +0000 |
---|---|---|
committer | mickey <> | 2003-02-12 06:49:04 +0000 |
commit | df50f5d5668c1dd3920be8a8c09c8bbd00f223cd (patch) | |
tree | 7d984833982a6c3230cf0317c9b1f313c2a2a648 /src/regress/lib/libc/alloca/alloca.c | |
parent | 240aed806834cc514ea7fc38b7d2bc36e60f9b78 (diff) | |
download | openbsd-df50f5d5668c1dd3920be8a8c09c8bbd00f223cd.tar.gz openbsd-df50f5d5668c1dd3920be8a8c09c8bbd00f223cd.tar.bz2 openbsd-df50f5d5668c1dd3920be8a8c09c8bbd00f223cd.zip |
simple alloca test. done twice per deraadt@ suggest
Diffstat (limited to 'src/regress/lib/libc/alloca/alloca.c')
-rw-r--r-- | src/regress/lib/libc/alloca/alloca.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/regress/lib/libc/alloca/alloca.c b/src/regress/lib/libc/alloca/alloca.c new file mode 100644 index 0000000000..4f1f18396a --- /dev/null +++ b/src/regress/lib/libc/alloca/alloca.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /* $OpeBSD$ */ | ||
2 | |||
3 | /* Copyright (c) 2003 Michael Shalayeff. Public Domain. */ | ||
4 | |||
5 | #include <stdio.h> | ||
6 | |||
7 | int | ||
8 | main() | ||
9 | { | ||
10 | char *q, *p; | ||
11 | |||
12 | p = alloca(41); | ||
13 | strcpy(p, "hellow world"); | ||
14 | |||
15 | q = alloca(53); | ||
16 | strcpy(q, "hellow world"); | ||
17 | |||
18 | exit(strcmp(p, q)); | ||
19 | } | ||