From: Willy Tarreau Date: Thu, 12 Mar 2020 16:24:53 +0000 (+0100) Subject: BUG/MINOR: haproxy: always initialize sleeping_thread_mask X-Git-Tag: v2.2-dev5~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8ea00e05e1e5358311086e2a4b9a47fb3fb306c;p=thirdparty%2Fhaproxy.git 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. --- 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,