- Fix #1457: race condition causes segfault when starting

threads.
This commit is contained in:
W.C.A. Wijngaards
2026-05-28 09:34:04 +02:00
parent c0741ccc68
commit 57f92cc97e
2 changed files with 7 additions and 2 deletions
+3 -2
View File
@@ -919,13 +919,14 @@ thread_start(void* arg)
{
struct worker* worker = (struct worker*)arg;
int port_num = 0;
log_assert(worker->thr_id);
set_log_thread_id(worker, worker->daemon->cfg);
{
char name[16]; /* seems to be the safest size between
different OSes */
snprintf(name, sizeof(name), "unbound/%u", worker->thread_num);
ub_thread_setname(worker->thr_id, name);
/* worker->thr_id can be written to after the thread was made
* by the creating thread, so this uses pthread_self. */
ub_thread_setname(ub_thread_self(), name);
}
ub_thread_blocksigs();
#ifdef THREADS_DISABLED
+4
View File
@@ -1,3 +1,7 @@
28 May 2026: Wouter
- Fix #1457: race condition causes segfault when starting
threads.
27 May 2026: Wouter
- Fix for autotrust state-file line overflow, that can give
hold-down bypass. Thanks to Qifan Zhang, Palo Alto Networks,