bind9/lib
Michał Kępień e974f98eb4
Improve stability of the jemalloc workaround
When jemalloc is linked into BIND 9 binaries (rather than preloaded or
used as the system allocator), depending on the decisions made by the
linker, the malloc() symbol may be resolved to a non-jemalloc
implementation at runtime.  Such a scenario foils the workaround added
in commit 2da371d005 as it relies on the
jemalloc implementation of malloc() to be executed.

Handle the above scenario properly by calling mallocx() explicitly
instead of relying on the runtime resolution of the malloc() symbol.
Use trivial wrapper functions to avoid the need to copy multiple #ifdef
lines from lib/isc/mem.c to lib/isc/trampoline.c.  Using a simpler
alternative, e.g. calling isc_mem_create() & isc_mem_destroy(), was
already considered before and rejected, as described in the log message
for commit 2da371d005.

ADJUST_ZERO_ALLOCATION_SIZE() is only used in isc__mem_free_noctx() to
concisely avoid compilation warnings about its 'size' parameter not
being used when building against jemalloc < 4.0.0 (as sdallocx() is then
redefined to dallocx(), which has a different signature).
2023-11-01 18:04:07 +01:00
..
bind9 deprecate delegation-only and root-delegation only 2023-03-23 14:09:53 -07:00
dns Only declare 'engine' if it is used 2023-10-27 10:49:38 +11:00
irs Properly process extra nameserver lines in resolv.conf 2023-05-16 13:29:33 +10:00
isc Improve stability of the jemalloc workaround 2023-11-01 18:04:07 +01:00
isccc Limit isccc_cc_fromwire recursion depth 2023-09-07 19:50:27 +02:00
isccfg Update the source code formatting using clang-format-17 2023-10-18 09:02:57 +02:00
ns Don't ignore auth zones when in serve-stale mode 2023-10-31 13:52:08 +01: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