bind9/tests
Aram Sargsyan 0a48252b53 Fix a data race in isc_task_purgeevent()
When isc_task_purgeevent() is called for and 'event', the event, in
the meanwhile, could in theory get processed, unlinked, and freed.
So when the function then operates on the 'event', it causes a
segmentation fault.

The only place where isc_task_purgeevent() is called is from
timer_purge().

In order to resolve the data race, call isc_task_purgeevent() inside
the 'timer->lock' locked block, so that timerevent_destroy() won't
be able to destroy the event if it was processed in the meanwhile,
before isc_task_purgeevent() had a chance to purge it.

In order to be able to do that, move the responsibility of calling
isc_event_free() (upon a successful purge) out from the
isc_task_purgeevent() function to its caller instead, so that it can
be called outside of the timer->lock locked block.
2024-05-17 12:08:27 +00:00
..
dns Only check SVBC alias forms at higher levels 2024-05-07 02:08:27 +00:00
include/tests Revert "Kill unit tests that run more than 1200 seconds" 2023-04-14 06:21:03 +02:00
irs Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
isc Fix a data race in isc_task_purgeevent() 2024-05-17 12:08:27 +00:00
isccfg Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
libtest Add workaround for jemalloc linking order 2024-01-18 10:40:46 +01:00
ns Include <inttypes.h> whenever including <cmocka.h> 2023-05-18 15:36:03 +02:00
.gitignore Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
Makefile.am Stop the unit tests from running twice 2022-05-31 12:06:00 +02:00
unit-test-driver.sh.in Reformat shell scripts with shfmt 2023-10-26 13:05:00 +02:00