diff options
| author | bluhm <> | 2018-11-28 13:34:06 +0000 | 
|---|---|---|
| committer | bluhm <> | 2018-11-28 13:34:06 +0000 | 
| commit | 901805df68141c51d89f7d3584514f7fd725f10f (patch) | |
| tree | a618fdbea88f7869f5a52ad07f2d6b426a43c911 /src | |
| parent | df589015ce8498eea97628dcddf139bf3983e3bf (diff) | |
| download | openbsd-901805df68141c51d89f7d3584514f7fd725f10f.tar.gz openbsd-901805df68141c51d89f7d3584514f7fd725f10f.tar.bz2 openbsd-901805df68141c51d89f7d3584514f7fd725f10f.zip | |
This test does not terminate if malloc conf is preconfigured with
J.  Clear that option to allow running full regress with paranoid
malloc flags.  Also fix whitespace.
OK otto@
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c index 94f7eb16b5..20dd1a419e 100644 --- a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c +++ b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: malloc_ulimit1.c,v 1.3 2017/07/27 15:08:37 bluhm Exp $ */ | 1 | /* $OpenBSD: malloc_ulimit1.c,v 1.4 2018/11/28 13:34:06 bluhm Exp $ */ | 
| 2 | 2 | ||
| 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ | 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ | 
| 4 | 4 | ||
| @@ -14,13 +14,13 @@ | |||
| 14 | * 2006) where the allocation of the region itself succeeds, but the | 14 | * 2006) where the allocation of the region itself succeeds, but the | 
| 15 | * page dir entry pages fails. | 15 | * page dir entry pages fails. | 
| 16 | * This in turn trips a "hole in directories" error. | 16 | * This in turn trips a "hole in directories" error. | 
| 17 | * Having a large (512M) ulimit -m helps a lot in triggering the | 17 | * Having a large (512M) ulimit -m helps a lot in triggering the | 
| 18 | * problem. Note that you may need to run this test multiple times to | 18 | * problem. Note that you may need to run this test multiple times to | 
| 19 | * see the error. | 19 | * see the error. | 
| 20 | */ | 20 | */ | 
| 21 | 21 | ||
| 22 | #define STARTI 1300 | 22 | #define STARTI 1300 | 
| 23 | #define FACTOR 1024 | 23 | #define FACTOR 1024 | 
| 24 | 24 | ||
| 25 | int | 25 | int | 
| 26 | main() | 26 | main() | 
| @@ -29,6 +29,10 @@ main() | |||
| 29 | size_t sz; | 29 | size_t sz; | 
| 30 | int i; | 30 | int i; | 
| 31 | void *p; | 31 | void *p; | 
| 32 | extern char *malloc_options; | ||
| 33 | |||
| 34 | /* This test takes forever with junking turned on. */ | ||
| 35 | malloc_options = "jj"; | ||
| 32 | 36 | ||
| 33 | if (getrlimit(RLIMIT_DATA, &lim) == -1) | 37 | if (getrlimit(RLIMIT_DATA, &lim) == -1) | 
| 34 | err(1, "getrlimit"); | 38 | err(1, "getrlimit"); | 
