[9.20] fix: dev: Set name for all the isc_mem contexts

Backport of MR !10425

Merge branch 'backport-ondrej/fix-isc_mem_setname-usage-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10498
This commit is contained in:
Ondřej Surý 2025-05-29 04:34:24 +00:00
commit bdcd698edf
3 changed files with 3 additions and 0 deletions

View file

@ -223,6 +223,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
}
isc_mem_create(&mctx);
isc_mem_setname(mctx, "named_dlz");
cd = isc_mem_get(mctx, sizeof(*cd));
*cd = (dlopen_data_t){
.mctx = mctx,

View file

@ -641,6 +641,7 @@ printversion(bool verbose) {
printf("threads support is enabled\n");
isc_mem_create(&mctx);
isc_mem_setname(mctx, "main");
result = dst_lib_init(mctx, named_g_engine);
if (result == ISC_R_SUCCESS) {
isc_buffer_init(&b, buf, sizeof(buf));

View file

@ -22,6 +22,7 @@ isc_managers_create(isc_mem_t **mctxp, uint32_t workers,
REQUIRE(mctxp != NULL && *mctxp == NULL);
isc_mem_create(mctxp);
INSIST(*mctxp != NULL);
isc_mem_setname(*mctxp, "managers");
REQUIRE(loopmgrp != NULL && *loopmgrp == NULL);
isc_loopmgr_create(*mctxp, workers, loopmgrp);