]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make deleg cleanuptests memory assertions 32-bit-safe 12061/head
authorMichal Nowak <mnowak@isc.org>
Wed, 20 May 2026 08:59:49 +0000 (08:59 +0000)
committerMichal Nowak <mnowak@isc.org>
Wed, 20 May 2026 13:29:22 +0000 (13:29 +0000)
commit4623873e588c86c6add4d53708e754e2d6f3e087
tree6672acf8cfd49c46ee2de61f9156e84700cab5c8
parent6cae1d10ca35bd5458613b32ee09b0131b950556
Make deleg cleanuptests memory assertions 32-bit-safe

Each address entry stored by dns_delegset_addaddr() is an
isc_netaddrlink_t, whose size depends on sizeof(void *) via the
ISC_LINK macro (24 bytes of address + two prev/next pointers): 40
bytes on 64-bit, 32 bytes on 32-bit. The hardcoded 4 MB / 8 MB
ranges only held on 64-bit, so dns_deleg_cleanuptests failed on
armv7l with isc_mem_inuse() returning ~3.2 MB.

Express the expected ranges in terms of sizeof(isc_netaddrlink_t)
so they scale with pointer width, and pull the 99999 entry count
out into a NENTRIES macro.

Assisted-by: Claude:claude-opus-4-7
tests/dns/deleg_test.c