bind9/lib/isc/include/isc
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
..
aes.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
align.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
app.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
assertions.h Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
astack.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
atomic.h REQUIRE should not have side effects 2022-07-05 13:04:17 -07:00
attributes.h Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
backtrace.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
barrier.h Prefer the pthread_barrier implementation over uv_barrier 2023-01-11 10:21:39 +00:00
base32.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
base64.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
bind9.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
buffer.h change ISC__BUFFER macros to inline functions 2022-09-27 00:45:28 -07:00
cmocka.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
commandline.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
condition.h De-duplicate some calls to strerror_r() 2022-10-17 16:00:27 +01:00
counter.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
crc64.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
deprecated.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dir.h Update clang to version 14 2022-06-16 18:09:33 +02:00
endian.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
errno.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
error.h Include the function name when reporting unexpected errors 2022-10-17 16:00:27 +01:00
event.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
eventclass.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
file.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
formatcheck.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
fsaccess.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
fuzz.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
glob.h Update clang to version 14 2022-06-16 18:09:33 +02:00
hash.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
heap.h Make isc_heap_create() and isc_heap_insert() return void 2022-03-08 20:24:54 +01:00
hex.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
hmac.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ht.h Implement incremental hash table resizing in isc_ht 2023-01-11 17:15:33 +01:00
httpd.h Rewrite isc_httpd using picohttpparser and isc_url_parse 2022-10-20 16:10:21 +02:00
interfaceiter.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
iterated_hash.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
lang.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
lex.h Update clang to version 14 2022-06-16 18:09:33 +02:00
list.h Replace (void *)-1 with ISC_LINK_TOMBSTONE 2022-10-18 14:30:43 +02:00
log.h Update clang to version 14 2022-06-16 18:09:33 +02:00
magic.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
managers.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
md.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mem.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
meminfo.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mutex.h De-duplicate some calls to strerror_r() 2022-10-17 16:00:27 +01:00
mutexblock.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
net.h remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
netaddr.h update dlz_minimal.h 2022-01-27 16:18:34 -08:00
netdb.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
netmgr.h Update the set of HTTP endpoints on reconfiguration 2022-06-28 16:37:31 +03:00
netscope.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nonce.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
offset.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
once.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
os.h Use detected cache line size 2022-01-27 13:07:31 +01:00
parseint.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
pool.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
portset.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
print.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
quota.h Update clang to version 14 2022-06-16 18:09:33 +02:00
radix.h Update clang to version 14 2022-06-16 18:09:33 +02:00
random.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ratelimiter.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
refcount.h Backport ISC_REFCOUNT{,_TRACE}_{DECL,IMPL} macros 2022-12-21 12:41:15 +00:00
regex.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
region.h Update clang to version 14 2022-06-16 18:09:33 +02:00
resource.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
result.h Add ISC_R_TLSBADPEERCERT error code to the TLS related code 2022-04-28 13:39:21 +03:00
rwlock.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
safe.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
serial.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
siphash.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
sockaddr.h update dlz_minimal.h 2022-01-27 16:18:34 -08:00
stat.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
stats.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
stdatomic.h Remove usage of deprecated ATOMIC_VAR_INIT() macro 2022-03-09 09:25:37 +01:00
stdio.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
stdtime.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
strerr.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
string.h Use strnstr implementation from FreeBSD if not provided by OS 2022-10-04 15:33:33 +11:00
symtab.h Update clang to version 14 2022-06-16 18:09:33 +02:00
syslog.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
task.h Add isc_task_setquantum() and use it for post-init zone loading 2023-01-18 18:04:41 +01:00
taskpool.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
thread.h Update clang to version 14 2022-06-16 18:09:33 +02:00
time.h Deduplicate time unit conversion factors 2022-11-25 14:16:09 +00:00
timer.h Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
tls.h tlsctx_client_session_cache_new() -> tlsctx_client_session_create() 2022-12-23 13:58:14 +02:00
tm.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
types.h remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
url.h Rewrite isc_httpd using picohttpparser and isc_url_parse 2022-10-20 16:10:21 +02:00
utf8.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
util.h Include the function name when reporting unexpected errors 2022-10-17 16:00:27 +01:00