]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: proxy: use aligned allocations for struct proxy_per_tgroup
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Nov 2025 21:10:45 +0000 (22:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Nov 2025 21:22:55 +0000 (22:22 +0100)
commitfb8edd0ce69e98e3c9a08e6546edceef1cc4a7f6
tree41f584230d6f82170e7467fc03692dc3f956cb22
parentdf9eb2e7b6901c561b76c0b77bdb15717adac91e
BUG/MEDIUM: proxy: use aligned allocations for struct proxy_per_tgroup

In 3.2, commit f879b9a18 ("MINOR: proxies: Add a per-thread group field
to struct proxy") introduced struct proxy_per_tgroup that is declared as
thread_aligned, but is allocated using calloc(). Thus it is at risk of
crashing on machines using instructions requiring 64-byte alignment such
as AVX512. Let's use ha_aligned_zalloc_typed() instead of malloc().

For 3.2, we don't have aligned allocations, so instead the THREAD_ALIGNED()
will have to be removed from the struct definition. Alternately, we could
manually align it as is done for fdtab.
src/proxy.c