From ba84074f57e5f0f067c453aa61cee8316107861a Mon Sep 17 00:00:00 2001 From: otto <> Date: Thu, 29 Nov 2018 06:04:09 +0000 Subject: We're manipulating malloc flags ourselves, start with restting them all. ok bluhm@ --- src/regress/lib/libc/malloc/malloc_general/malloc_general.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/regress/lib/libc/malloc/malloc_general/malloc_general.c b/src/regress/lib/libc/malloc/malloc_general/malloc_general.c index 51bfb03a34..b90e97ad15 100644 --- a/src/regress/lib/libc/malloc/malloc_general/malloc_general.c +++ b/src/regress/lib/libc/malloc/malloc_general/malloc_general.c @@ -60,11 +60,15 @@ main(int argc, char *argv[]) int count, p, i; void * q; size_t sz; + char mo[20]; if (argc == 1) errx(1, "usage: malloc_options"); - malloc_options = argv[1]; + /* first reset flags that might be set by env or sysctl */ + strlcpy(mo, "cfgju", sizeof(mo)); + strlcat(mo, argv[1], sizeof(mo)); + malloc_options = mo; for (count = 0; count < 800000; count++) { if (count % 10000 == 0) { -- cgit v1.2.3-55-g6feb