summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjasper <>2021-09-01 09:26:32 +0000
committerjasper <>2021-09-01 09:26:32 +0000
commit15410c1fb383e330324b13897f3703fcfde7969e (patch)
tree4d38bd9b948f5f7e3335e47a697a63593c1a8153
parent414ce9bc403d88f0560f6570625d3116e7d18e5b (diff)
downloadopenbsd-15410c1fb383e330324b13897f3703fcfde7969e.tar.gz
openbsd-15410c1fb383e330324b13897f3703fcfde7969e.tar.bz2
openbsd-15410c1fb383e330324b13897f3703fcfde7969e.zip
remove manual fiddling with MALLOC_OPTIONS from libc regress tests
these options should be set globally (sysctl) when running regress as opposed to having individual tests set it, barring a few specific exceptions. ok bluhm@
-rw-r--r--src/regress/lib/libc/env/envtest.c5
-rw-r--r--src/regress/lib/libc/strchr/strchrtest.c5
-rw-r--r--src/regress/lib/libc/strlcat/strlcattest.c5
-rw-r--r--src/regress/lib/libc/strlcpy/strlcpytest.c5
-rw-r--r--src/regress/lib/libc/strnlen/strnlentest.c5
5 files changed, 5 insertions, 20 deletions
diff --git a/src/regress/lib/libc/env/envtest.c b/src/regress/lib/libc/env/envtest.c
index f145ecbd14..79a5c0655f 100644
--- a/src/regress/lib/libc/env/envtest.c
+++ b/src/regress/lib/libc/env/envtest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: envtest.c,v 1.2 2019/01/25 00:19:26 millert Exp $ */ 1/* $OpenBSD: envtest.c,v 1.3 2021/09/01 09:26:32 jasper Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2010 Todd C. Miller <millert@openbsd.org> 4 * Copyright (c) 2010 Todd C. Miller <millert@openbsd.org>
@@ -63,9 +63,6 @@ main(int argc, char *argv[])
63 int n, failures = 0; 63 int n, failures = 0;
64 size_t len, bufsize; 64 size_t len, bufsize;
65 65
66 /* Enable malloc security options. */
67 setenv("MALLOC_OPTIONS", "S", 0);
68
69 fake_env(); 66 fake_env();
70 n = count_instances("USER"); 67 n = count_instances("USER");
71 if (n != 2) { 68 if (n != 2) {
diff --git a/src/regress/lib/libc/strchr/strchrtest.c b/src/regress/lib/libc/strchr/strchrtest.c
index 64d6120305..0be4c8df63 100644
--- a/src/regress/lib/libc/strchr/strchrtest.c
+++ b/src/regress/lib/libc/strchr/strchrtest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strchrtest.c,v 1.1 2021/07/24 05:45:49 visa Exp $ */ 1/* $OpenBSD: strchrtest.c,v 1.2 2021/09/01 09:26:32 jasper Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2021 Visa Hankala 4 * Copyright (c) 2021 Visa Hankala
@@ -28,9 +28,6 @@ main(void)
28 char *buf; 28 char *buf;
29 size_t bufsize; 29 size_t bufsize;
30 30
31 /* Enable malloc security options. */
32 setenv("MALLOC_OPTIONS", "S", 0);
33
34 /* Allocate buffer with guard pages. */ 31 /* Allocate buffer with guard pages. */
35 bufsize = getpagesize(); 32 bufsize = getpagesize();
36 buf = malloc(bufsize); 33 buf = malloc(bufsize);
diff --git a/src/regress/lib/libc/strlcat/strlcattest.c b/src/regress/lib/libc/strlcat/strlcattest.c
index 86896ff987..00a9212eb5 100644
--- a/src/regress/lib/libc/strlcat/strlcattest.c
+++ b/src/regress/lib/libc/strlcat/strlcattest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strlcattest.c,v 1.3 2019/01/25 00:19:26 millert Exp $ */ 1/* $OpenBSD: strlcattest.c,v 1.4 2021/09/01 09:26:32 jasper Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Todd C. Miller <millert@openbsd.org> 4 * Copyright (c) 2014 Todd C. Miller <millert@openbsd.org>
@@ -43,9 +43,6 @@ main(int argc, char *argv[])
43 size_t len, bufsize; 43 size_t len, bufsize;
44 int failures = 0; 44 int failures = 0;
45 45
46 /* Enable malloc security options. */
47 setenv("MALLOC_OPTIONS", "S", 0);
48
49 bufsize = getpagesize(); /* trigger guard pages easily */ 46 bufsize = getpagesize(); /* trigger guard pages easily */
50 buf = malloc(bufsize); 47 buf = malloc(bufsize);
51 if (buf == NULL) { 48 if (buf == NULL) {
diff --git a/src/regress/lib/libc/strlcpy/strlcpytest.c b/src/regress/lib/libc/strlcpy/strlcpytest.c
index e2151aea74..8f1d12dbce 100644
--- a/src/regress/lib/libc/strlcpy/strlcpytest.c
+++ b/src/regress/lib/libc/strlcpy/strlcpytest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strlcpytest.c,v 1.3 2019/01/25 00:19:26 millert Exp $ */ 1/* $OpenBSD: strlcpytest.c,v 1.4 2021/09/01 09:26:32 jasper Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Todd C. Miller <millert@openbsd.org> 4 * Copyright (c) 2014 Todd C. Miller <millert@openbsd.org>
@@ -43,9 +43,6 @@ main(int argc, char *argv[])
43 size_t len, bufsize; 43 size_t len, bufsize;
44 int failures = 0; 44 int failures = 0;
45 45
46 /* Enable malloc security options. */
47 setenv("MALLOC_OPTIONS", "S", 0);
48
49 bufsize = getpagesize(); /* trigger guard pages easily */ 46 bufsize = getpagesize(); /* trigger guard pages easily */
50 buf = malloc(bufsize); 47 buf = malloc(bufsize);
51 buf2 = malloc(bufsize); 48 buf2 = malloc(bufsize);
diff --git a/src/regress/lib/libc/strnlen/strnlentest.c b/src/regress/lib/libc/strnlen/strnlentest.c
index 045b258bf1..78f8cfb252 100644
--- a/src/regress/lib/libc/strnlen/strnlentest.c
+++ b/src/regress/lib/libc/strnlen/strnlentest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strnlentest.c,v 1.2 2019/01/25 00:19:26 millert Exp $ */ 1/* $OpenBSD: strnlentest.c,v 1.3 2021/09/01 09:26:32 jasper Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2010 Todd C. Miller <millert@openbsd.org> 4 * Copyright (c) 2010 Todd C. Miller <millert@openbsd.org>
@@ -29,9 +29,6 @@ int main(int argc, char *argv[])
29 int failures = 0; 29 int failures = 0;
30 size_t len, bufsize; 30 size_t len, bufsize;
31 31
32 /* Enable malloc security options. */
33 setenv("MALLOC_OPTIONS", "S", 0);
34
35 bufsize = getpagesize(); /* trigger guard pages easily */ 32 bufsize = getpagesize(); /* trigger guard pages easily */
36 buf = malloc(bufsize); 33 buf = malloc(bufsize);
37 if (buf == NULL) { 34 if (buf == NULL) {