From f8ea00e05e1e5358311086e2a4b9a47fb3fb306c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 12 Mar 2020 17:24:53 +0100 Subject: [PATCH] BUG/MINOR: haproxy: always initialize sleeping_thread_mask Surprizingly the variable was never initialized, though on most platforms it's zeroed at boot, and it is relatively harmless anyway since in the worst case the bits are updated around poll(). This was introduced by commit 79321b95a85 and needs to be backported as far as 1.9. --- src/haproxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 29c65f5922..64da497b08 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -145,7 +145,8 @@ int relative_pid = 1; /* process id starting at 1 */ unsigned long pid_bit = 1; /* bit corresponding to the process id */ unsigned long all_proc_mask = 1; /* mask of all processes */ -volatile unsigned long sleeping_thread_mask; /* Threads that are about to sleep in poll() */ +volatile unsigned long sleeping_thread_mask = 0; /* Threads that are about to sleep in poll() */ + /* global options */ struct global global = { .hard_stop_after = TICK_ETERNITY, -- 2.47.3