]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Set name for all the isc_mem context
authorOndřej Surý <ondrej@isc.org>
Fri, 25 Apr 2025 11:01:16 +0000 (13:01 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 29 May 2025 03:45:12 +0000 (05:45 +0200)
The memory context for managers and dlz_dlopen_driver units had no name
and that was causing trouble with the statistics channel output.  Set
the name for the two memory context that were missing a proper name.

(cherry picked from commit 5d264b33295d164d55659b166ead7b31b92eda39)

bin/named/dlz_dlopen_driver.c
bin/named/main.c
lib/isc/managers.c

index 5e6755512f1c9b7fd76cec41e3ccee09449fcf86..7df54351da77eb2bf46bb1ff9301abb9854b4131 100644 (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,
index ed414f9694c764c2f20b3d18960ef2c8bc17c571..5b456b2290e050d68648bee54266696092769dc7 100644 (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));
index 5471122300aaea06d04d1e4cb7489f3c0357e39c..6950825dd9a965853438ba6391455b968d2bda7c 100644 (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);