From df50f5d5668c1dd3920be8a8c09c8bbd00f223cd Mon Sep 17 00:00:00 2001 From: mickey <> Date: Wed, 12 Feb 2003 06:49:04 +0000 Subject: simple alloca test. done twice per deraadt@ suggest --- src/regress/lib/libc/alloca/alloca.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/regress/lib/libc/alloca/alloca.c (limited to 'src/regress/lib/libc/alloca/alloca.c') 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 @@ +/* $OpeBSD$ */ + +/* Copyright (c) 2003 Michael Shalayeff. Public Domain. */ + +#include + +int +main() +{ + char *q, *p; + + p = alloca(41); + strcpy(p, "hellow world"); + + q = alloca(53); + strcpy(q, "hellow world"); + + exit(strcmp(p, q)); +} -- cgit v1.2.3-55-g6feb