bind9/lib
Ondřej Surý e26aa4cbb1
Don't use reference counting in isc_timer unit
The reference counting and isc_timer_attach()/isc_timer_detach()
semantic are actually misleading because it cannot be used under normal
conditions.  The usual conditions under which is timer used uses the
object where timer is used as argument to the "timer" itself.  This
means that when the caller is using `isc_timer_detach()` it needs the
timer to stop and the isc_timer_detach() does that only if this would be
the last reference.  Unfortunately, this also means that if the timer is
attached elsewhere and the timer is fired it will most likely be
use-after-free, because the object used in the timer no longer exists.

Remove the reference counting from the isc_timer unit, remove
isc_timer_attach() function and rename isc_timer_detach() to
isc_timer_destroy() to better reflect how the API needs to be used.

The only caveat is that the already executed event must be destroyed
before the isc_timer_destroy() is called because the timer is no longet
attached to .ev_destroy_arg.

(cherry picked from commit ae01ec2823)
2023-01-18 22:39:26 +01:00
..
bind9 remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
dns Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
irs Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
isc Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
isccc Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
isccfg remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
ns Don't set EDE in ns_client_aclchecksilent 2023-01-10 10:02:14 +00: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