]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: poll: too large size allocation for FD events
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Jan 2018 14:48:53 +0000 (15:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Jan 2018 14:52:11 +0000 (15:52 +0100)
commitcc35923c329bbadc78c1c026ce4e45e115852abe
tree4a35b04b978a5865e1c6bf777a515fc54544442a
parent260bf5c1064e4d2da61b4c73f69b7716cc8eb7ed
BUG/MINOR: poll: too large size allocation for FD events

Commit 80da05a ("MEDIUM: poll: do not use FD_* macros anymore") which
appeared in 1.5-dev18 and which was backported to 1.4.23 made explicit
use of arrays of FDs mapped to unsigned ints. The problem lies in the
allocated size for poll(), as the resulting size is in bits and not
bytes, resulting in poll() arrays being 8 times larger than necessary!

In practice poll() is not used on highly loaded systems, explaining why
nobody noticed. But it definetely has to be addressed.

This fix needs to be backported to all stable versions.
src/ev_poll.c