From: W.C.A. Wijngaards Date: Thu, 1 Aug 2024 15:15:07 +0000 (+0200) Subject: - Fix that the worker mem report with alloc stats does not attempt X-Git-Tag: release-1.21.0rc1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92be76fb89a27359ef6992e3a07d8bd1e27b1df8;p=thirdparty%2Funbound.git - Fix that the worker mem report with alloc stats does not attempt to print memory use of forwards and hints if they have been deleted already. --- diff --git a/daemon/worker.c b/daemon/worker.c index b35fe65a3..dd14a5a3c 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -160,9 +160,11 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker), + sizeof(worker->rndstate) + regional_get_mem(worker->scratchpad) + sizeof(*worker->env.scratch_buffer) - + sldns_buffer_capacity(worker->env.scratch_buffer) - + forwards_get_mem(worker->env.fwds) - + hints_get_mem(worker->env.hints); + + sldns_buffer_capacity(worker->env.scratch_buffer); + if(worker->daemon->env->fwds) + me += forwards_get_mem(worker->env.fwds); + if(worker->daemon->env->hints) + me += hints_get_mem(worker->env.hints); if(worker->thread_num == 0) me += acl_list_get_mem(worker->daemon->acl); if(cur_serv) { diff --git a/doc/Changelog b/doc/Changelog index 7e1b81eb4..f94ed7fec 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,9 @@ to free the tail, specifically in the free of the list since that picked up the next item in the list for its loop causing invalid free. Added internal unit test to unbound-dnstap-socket for that. + - Fix that the worker mem report with alloc stats does not attempt + to print memory use of forwards and hints if they have been + deleted already. 31 July 2024: Wouter - Fix for #1114: Fix that cache fill for forward-host names is