]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: queues: Fix arithmetic when feeling non_empty_tgids
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 15 Jan 2026 03:22:10 +0000 (03:22 +0000)
committerOlivier Houchard <ohouchard@haproxy.com>
Thu, 15 Jan 2026 03:28:04 +0000 (04:28 +0100)
commit6249698840a92639077e323bb5cc5c27a4825698
tree218092a2ab91c337978a4574ab801a2cf48d2fc8
parent1397982599433f48a2c0e501c893688f7f017241
BUG/MEDIUM: queues: Fix arithmetic when feeling non_empty_tgids

Fix the arithmetic when pre-filling non_empty_tgids when we still have
more than 32/64 thread groups left, to get the right index, we of course
have to divide the number of thread groups by the number of bits in a
long.
This bug was introduced by commit
7e1fed4b7a8b862bf7722117f002ee91a836beb5, but hopefully was not hit
because it requires to have at least as much thread groups as there are
bits in a long, which is impossible on 64bits machines, as MAX_TGROUPS
is still 32.
src/queue.c