bind9/lib/isc/include/isc
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
..
aes.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
app.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
assertions.h Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 09:33:51 +01:00
astack.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
atomic.h Remove debugging implementation of stdatomic using mutexes 2022-03-17 21:44:04 +01:00
backtrace.h Update clang to version 14 2022-06-16 18:11:03 +02:00
barrier.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
base32.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
base64.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
bind9.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
buffer.h add assertions to isc_buffer macros 2022-09-26 23:48:21 -07:00
bufferlist.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
cmocka.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
commandline.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
counter.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
crc64.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
deprecated.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
endian.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
errno.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
error.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
event.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
eventclass.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
file.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
formatcheck.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
fsaccess.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
fuzz.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
hash.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
heap.h Make isc_heap_create() and isc_heap_insert() return void 2022-03-08 20:49:15 +01:00
hex.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
hmac.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
ht.h Make isc_ht_init() and isc_ht_iter_create() return void 2022-03-08 20:20:52 +01:00
httpd.h Update clang to version 14 2022-06-16 18:11:03 +02:00
interfaceiter.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
iterated_hash.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
lang.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
lex.h Update clang to version 14 2022-06-16 18:11:03 +02:00
lfsr.h Update clang to version 14 2022-06-16 18:11:03 +02:00
lib.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
likely.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
list.h Replace (void *)-1 with ISC_LINK_TOMBSTONE 2022-10-18 14:30:49 +02:00
log.h Update clang to version 14 2022-06-16 18:11:03 +02:00
magic.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
Makefile.in Replace netievent lock-free queue with simple locked queue 2022-05-25 16:01:58 +02:00
managers.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
md.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
mem.h Handle ISC_MEM_DEFAULTFILL consistently 2022-07-15 10:45:34 +02:00
meminfo.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
mutexblock.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
netaddr.h extend DLZ interface and example with ECS support 2022-01-27 16:20:55 -08:00
netmgr.h Enable the load-balance-sockets configuration 2022-04-05 02:17:47 +02:00
netscope.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
nonce.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
os.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
parseint.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
platform.h.in Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
pool.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
portset.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
print.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
quota.h Update clang to version 14 2022-06-16 18:11:03 +02:00
radix.h Update clang to version 14 2022-06-16 18:11:03 +02:00
random.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
ratelimiter.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
refcount.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
regex.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
region.h Update clang to version 14 2022-06-16 18:11:03 +02:00
resource.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
result.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
resultclass.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
rwlock.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
safe.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
serial.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
siphash.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
sockaddr.h extend DLZ interface and example with ECS support 2022-01-27 16:20:55 -08:00
socket.h Update clang to version 14 2022-06-16 18:11:03 +02:00
stats.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
stdio.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
strerr.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
string.h Use strnstr implementation from FreeBSD if not provided by OS 2022-10-04 17:05:18 +11:00
symtab.h Update clang to version 14 2022-06-16 18:11:03 +02:00
task.h Add isc_task_setquantum() and use it for post-init zone loading 2023-01-19 11:28:10 +01:00
taskpool.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
timer.h Don't use reference counting in isc_timer unit 2023-01-19 11:28:10 +01:00
tm.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
types.h Replace netievent lock-free queue with simple locked queue 2022-05-25 16:01:58 +02:00
url.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
utf8.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
util.h Update clang to version 14 2022-06-16 18:11:03 +02:00
version.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00