mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
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
7e1fed4b7a, 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.
This commit is contained in:
parent
1397982599
commit
6249698840
1 changed files with 1 additions and 1 deletions
|
|
@ -396,7 +396,7 @@ int process_srv_queue(struct server *s)
|
|||
|
||||
|
||||
while (i >= LONGBITS) {
|
||||
non_empty_tgids[global.nbtgroups - i] = ULONG_MAX;
|
||||
non_empty_tgids[(global.nbtgroups - i) / LONGBITS] = ULONG_MAX;
|
||||
i -= LONGBITS;
|
||||
}
|
||||
while (i > 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue