diff options
author | 2018-11-29 06:04:09 +0000 | |
---|---|---|
committer | 2018-11-29 06:04:09 +0000 | |
commit | ddce81d18ead1cead306cecb446175faf94d13e9 (patch) | |
tree | d0a01a9b9155dc666675693b9643a4f308a6f029 /regress/lib/libc/malloc/malloc_general/malloc_general.c | |
parent | Better handle automatic column width assignments in the presence of (diff) | |
download | wireguard-openbsd-ddce81d18ead1cead306cecb446175faf94d13e9.tar.xz wireguard-openbsd-ddce81d18ead1cead306cecb446175faf94d13e9.zip |
We're manipulating malloc flags ourselves, start with restting them all.
ok bluhm@
Diffstat (limited to 'regress/lib/libc/malloc/malloc_general/malloc_general.c')
-rw-r--r-- | regress/lib/libc/malloc/malloc_general/malloc_general.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/regress/lib/libc/malloc/malloc_general/malloc_general.c b/regress/lib/libc/malloc/malloc_general/malloc_general.c index 51bfb03a341..b90e97ad15d 100644 --- a/regress/lib/libc/malloc/malloc_general/malloc_general.c +++ b/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) { |