From: W.C.A. Wijngaards Date: Wed, 4 Dec 2019 15:23:52 +0000 (+0100) Subject: - Fix Make Test Fails when Configured With --enable-alloc-nonregional, X-Git-Tag: release-1.9.6rc1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fb98a72d2e99269f628e14dee3b4264ead36a3d;p=thirdparty%2Funbound.git - Fix Make Test Fails when Configured With --enable-alloc-nonregional, reported by X41 D-Sec. --- diff --git a/doc/Changelog b/doc/Changelog index 3a3974804..1378ad241 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,8 @@ - Fix lock type for memory purify log lock deletion. - Fix testbound for alloccheck runs, memory purify and lock checks. - update contrib/fastrpz.patch to apply more cleanly. + - Fix Make Test Fails when Configured With --enable-alloc-nonregional, + reported by X41 D-Sec. 3 December 2019: Wouter - Merge pull request #124 from rmetrich: Changed log lock diff --git a/testcode/unitregional.c b/testcode/unitregional.c index 49c8147c9..d21e2caa3 100644 --- a/testcode/unitregional.c +++ b/testcode/unitregional.c @@ -50,7 +50,9 @@ corner_cases(struct regional* r) size_t s; /* shadow count of allocated memory */ void* a; size_t minsize = sizeof(uint64_t); +#ifndef UNBOUND_ALLOC_NONREGIONAL size_t mysize; +#endif char* str; unit_assert(r); /* alloc cases: @@ -75,6 +77,7 @@ corner_cases(struct regional* r) s+=0; unit_assert(r->available == r->first_size - s); +#ifndef UNBOUND_ALLOC_NONREGIONAL a = regional_alloc(r, 1); unit_assert(a); memset(a, 0x42, 1); @@ -171,6 +174,7 @@ corner_cases(struct regional* r) memset(a, 0x42, mysize); unit_assert(a); unit_assert(r->available == 8); +#endif /* UNBOUND_ALLOC_NONREGIONAL */ /* test if really copied over */ str = "test12345";