bind9/bin
Alessio Podda ae6a34cbda Decouple database and node lifetimes by adding node-specific vtables
All databases in the codebase follow the same structure: a database is
an associative container from DNS names to nodes, and each node is an
associative container from RR types to RR data.

Each database implementation (qpzone, qpcache, sdlz, builtin, dyndb) has
its own corresponding node type (qpznode, qpcnode, etc). However, some
code needs to work with nodes generically regardless of their specific
type - for example, to acquire locks, manage references, or
register/unregister slabs from the heap.

Currently, these generic node operations are implemented as methods in
the database vtable, which creates problematic coupling between database
and node lifetimes. If a node outlives its parent database, the node
destructor will destroy all RR data, and each RR data destructor will
try to unregister from heaps by calling a virtual function from the
database vtable. Since the database was already freed, this causes a
crash.

This commit breaks the coupling by standardizing the layout of all
database nodes, adding a dedicated vtable for node operations, and
moving node-specific methods from the database vtable to the node
vtable.
2025-08-07 11:39:38 -07:00
..
check Change the 'isc_g_mctx' to be always available 2025-08-04 11:29:50 +02:00
confgen Change the 'isc_g_mctx' to be always available 2025-08-04 11:29:50 +02:00
delv Change the 'isc_g_mctx' to be always available 2025-08-04 11:29:50 +02:00
dig Change the 'isc_g_mctx' to be always available 2025-08-04 11:29:50 +02:00
dnssec Decouple database and node lifetimes by adding node-specific vtables 2025-08-07 11:39:38 -07:00
named Decouple database and node lifetimes by adding node-specific vtables 2025-08-07 11:39:38 -07:00
nsupdate Change the 'isc_g_mctx' to be always available 2025-08-04 11:29:50 +02:00
plugins Convert DNS_RDATASETATTR_ bitfield manipulation to struct of bools 2025-07-10 11:17:19 +02:00
rndc Change the 'isc_g_mctx' to be always available 2025-08-04 11:29:50 +02:00
tests Decouple database and node lifetimes by adding node-specific vtables 2025-08-07 11:39:38 -07:00
tools Change the 'isc_g_mctx' to be always available 2025-08-04 11:29:50 +02:00
meson.build replace the build system with meson 2025-06-11 10:30:12 +03:00