This makes the test pass on sparc64 where the compiler may otherwise
store the variable in the strlcpy/strlcat function's delay slot.
OK kettenis@
-/* $OpenBSD: strlcattest.c,v 1.4 2021/09/01 09:26:32 jasper Exp $ */
+/* $OpenBSD: strlcattest.c,v 1.5 2021/09/27 19:33:58 millert Exp $ */
/*
* Copyright (c) 2014 Todd C. Miller <millert@openbsd.org>
char *buf, *cp, *ep;
struct sigaction sa;
size_t len, bufsize;
- int failures = 0;
+ volatile int failures = 0;
bufsize = getpagesize(); /* trigger guard pages easily */
buf = malloc(bufsize);
-/* $OpenBSD: strlcpytest.c,v 1.4 2021/09/01 09:26:32 jasper Exp $ */
+/* $OpenBSD: strlcpytest.c,v 1.5 2021/09/27 19:33:58 millert Exp $ */
/*
* Copyright (c) 2014 Todd C. Miller <millert@openbsd.org>
char *buf, *buf2, *cp, *ep;
struct sigaction sa;
size_t len, bufsize;
- int failures = 0;
+ volatile int failures = 0;
bufsize = getpagesize(); /* trigger guard pages easily */
buf = malloc(bufsize);