summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2019-06-11 22:16:13 +0000
committerbluhm <bluhm@openbsd.org>2019-06-11 22:16:13 +0000
commit3f7516ad71b80bda3cc3856625b18b6ca944fc36 (patch)
tree1dfa977a3dfb3c00bc9587bb005a5d254b39004c
parentFix typo which resulted in a segfault in ebgp multihop setups. (diff)
downloadwireguard-openbsd-3f7516ad71b80bda3cc3856625b18b6ca944fc36.tar.xz
wireguard-openbsd-3f7516ad71b80bda3cc3856625b18b6ca944fc36.zip
Disable junking with malloc options. If set, the test hangs on low
memory arm64 machines. found by patrick@; OK otto@
-rw-r--r--regress/lib/libc/malloc/malloc_errno/malloc_errno.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/regress/lib/libc/malloc/malloc_errno/malloc_errno.c b/regress/lib/libc/malloc/malloc_errno/malloc_errno.c
index 896ea3c9004..1759291f38c 100644
--- a/regress/lib/libc/malloc/malloc_errno/malloc_errno.c
+++ b/regress/lib/libc/malloc/malloc_errno/malloc_errno.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc_errno.c,v 1.4 2003/12/25 18:49:57 miod Exp $ */
+/* $OpenBSD: malloc_errno.c,v 1.5 2019/06/11 22:16:13 bluhm Exp $ */
/*
* Public domain. 2003, Otto Moerbeek
*/
@@ -7,6 +7,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* On arm64 with 2G of memory this test hangs while junking. */
+char *malloc_options = "jj";
+
static void
testerrno(size_t sz)
{
@@ -19,7 +22,7 @@ testerrno(size_t sz)
errx(1, "fail: %lx %p %d", (unsigned long)sz, p, errno);
/* if alloc succeeded, test if errno did not change */
- if (p != NULL && errno != -1)
+ if (p != NULL && errno != -1)
errx(1, "fail: %lx %p %d", (unsigned long)sz, p, errno);
free(p);