diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2018-11-29 06:04:10 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2018-11-29 06:04:10 +0000 |
commit | 42b93047bea155ebfb21edabba09e87eb0eaed1f (patch) | |
tree | 4be55541a96deaa689b97e4f05f08eaaac1218be /regress/lib | |
parent | 7ead76a0a2a168ac3f08e52fbe9b18f481ae9b3d (diff) |
We're manipulating malloc flags ourselves, start with restting them all.
ok bluhm@
Diffstat (limited to 'regress/lib')
-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) { |