bind9/lib
Ondřej Surý ebcfb16576 Enable tracking of pthreads mutexes
Some POSIX threads implementations (e.g. FreeBSD's libthr) allocate
memory on the heap when pthread_mutex_init() is called.  Every call to
that function must be accompanied by a corresponding call to
pthread_mutex_destroy() or else the memory allocated for the mutex will
leak.

jemalloc can be used for detecting memory allocations which are not
released by a process when it exits.  Unfortunately, since jemalloc is
also the system allocator on FreeBSD and a special (profiling-enabled)
build of jemalloc is required for memory leak detection, this method
cannot be used for detecting leaked memory allocated by libthr on a
stock FreeBSD installation.

However, libthr's behavior can be emulated on any platform by
implementing alternative versions of libisc functions for creating and
destroying mutexes that allocate memory using malloc() and release it
using free().  This enables using jemalloc for detecting missing
pthread_mutex_destroy() calls on any platform on which it works
reliably.

Introduce a new ISC_TRACK_PTHREADS_OBJECTS preprocessor macro, which
causes isc_mutex_t structures to be allocated on the heap by
isc_mutex_init() and freed by isc_mutex_destroy().  Reuse existing mutex
macros (after renaming them appropriately) for other operations.
2022-07-13 13:19:32 +02:00
..
bind9 prevent a possible buffer overflow in configuration check 2022-05-13 19:59:58 -07:00
dns Stop resolving invalid names in resume_dslookup() 2022-07-13 10:31:16 +02:00
irs Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
isc Enable tracking of pthreads mutexes 2022-07-13 13:19:32 +02:00
isccc Update clang to version 14 2022-06-16 17:21:11 +02:00
isccfg Obsolete the "glue-cache" option 2022-06-30 15:24:08 +02:00
ns log the reason for falling back to AXFR from IXFR at level info 2022-07-12 16:02:54 -07:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
Makefile.am move samples/resolve.c to bin/tests/system 2021-04-16 14:29:43 +02:00