mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 10:10:06 +00:00
Check the libuv, OpenSSL and libxml2 memory context on exit
As we can't check the deallocations done in the library memory contexts by default because it would always fail on non-clean exit (that happens on error or by calling exit() early), we just want to enable the checks to be done on normal exit.
This commit is contained in:
parent
e537fea861
commit
d1cc847ab0
@ -6,7 +6,8 @@ AM_CPPFLAGS += \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(LIBIDN2_CFLAGS)
|
||||
$(LIBIDN2_CFLAGS) \
|
||||
$(LIBUV_CFLAGS)
|
||||
|
||||
LDADD += \
|
||||
libdighost.la \
|
||||
|
@ -54,8 +54,11 @@
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/tls.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/util.h>
|
||||
#include <isc/uv.h>
|
||||
#include <isc/xml.h>
|
||||
|
||||
#include <dns/byaddr.h>
|
||||
#include <dns/fixedname.h>
|
||||
@ -4701,6 +4704,12 @@ destroy_libs(void) {
|
||||
}
|
||||
|
||||
isc_managers_destroy(&mctx, &loopmgr, &netmgr, &taskmgr);
|
||||
|
||||
isc__tls_setdestroycheck(true);
|
||||
isc__uv_setdestroycheck(true);
|
||||
isc__xml_setdestroycheck(true);
|
||||
|
||||
isc_mem_checkdestroyed(stderr);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBIDN2
|
||||
|
@ -1584,6 +1584,10 @@ main(int argc, char *argv[]) {
|
||||
&named_g_taskmgr);
|
||||
isc_mem_checkdestroyed(stderr);
|
||||
|
||||
isc__tls_setdestroycheck(true);
|
||||
isc__uv_setdestroycheck(true);
|
||||
isc__xml_setdestroycheck(true);
|
||||
|
||||
named_main_setmemstats(NULL);
|
||||
|
||||
named_os_closedevnull();
|
||||
|
Loading…
x
Reference in New Issue
Block a user