bind9/lib/isc/tests
Ondřej Surý e241a3f4db 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-19 11:28:10 +01:00
..
testdata/file [master] new mkeys and nzf naming format 2014-11-04 19:43:27 -08:00
aes_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
buffer_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
counter_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
crc64_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
errno_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
file_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
hash_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
heap_test.c Make isc_heap_create() and isc_heap_insert() return void 2022-03-08 20:49:15 +01:00
hmac_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
ht_test.c Make isc_ht_init() and isc_ht_iter_create() return void 2022-03-08 20:20:52 +01:00
isctest.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
isctest.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
Kyuafile Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
lex_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
Makefile.in Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
md_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
mem_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
netaddr_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
netmgr_test.c Replace netievent lock-free queue with simple locked queue 2022-05-25 16:01:58 +02:00
parse_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
pool_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
quota_test.c Remove usage of deprecated ATOMIC_VAR_INIT() macro 2022-03-17 21:44:04 +01:00
radix_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
random_test.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
regex_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
result_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
safe_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
siphash_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
sockaddr_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
socket_test.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
stats_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
symtab_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
task_test.c Don't use reference counting in isc_timer unit 2023-01-19 11:28:10 +01:00
taskpool_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
time_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
timer_test.c Don't use reference counting in isc_timer unit 2023-01-19 11:28:10 +01:00
uv_wrap.h Remove usage of deprecated ATOMIC_VAR_INIT() macro 2022-03-17 21:44:04 +01:00