bind9/bin
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
..
check Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
confgen Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
delv Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
dig remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
dnssec Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
named Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
nsupdate remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
plugins Implement incremental hash table resizing in isc_ht 2023-01-11 17:15:33 +01:00
rndc Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
tests Fix feature detection for pytest markers in tests 2023-01-17 14:50:23 +01:00
tools remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
Makefile.am Remove native PKCS#11 support 2021-09-09 15:35:39 +02:00