mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-26 19:41:04 -05:00
Instead of calling isc_tls_initialize()/isc_tls_destroy() explicitly use gcc/clang attributes on POSIX and DLLMain on Windows to initialize and shutdown OpenSSL library. This resolves the issue when isc_nm_create() / isc_nm_destroy() was called multiple times and it would call OpenSSL library destructors from isc_nm_destroy(). At the same time, since we now have introduced the ctor/dtor for libisc, this commit moves the isc_mem API initialization (the list of the contexts) and changes the isc_mem_checkdestroyed() to schedule the checking of memory context on library unload instead of executing the code immediately.
34 lines
712 B
C
34 lines
712 B
C
/*
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
* information regarding copyright ownership.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <isc/mem.h>
|
|
|
|
/*! \file */
|
|
|
|
void
|
|
isc__mem_printactive(isc_mem_t *mctx, FILE *file);
|
|
/*%<
|
|
* For use by unit tests, prints active memory blocks for
|
|
* a single memory context.
|
|
*/
|
|
|
|
void
|
|
isc__mem_checkdestroyed(void);
|
|
|
|
void
|
|
isc__mem_initialize(void);
|
|
|
|
void
|
|
isc__mem_shutdown(void);
|