]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: stats-file: reject tgid 0 when preloading shm objects
authorWilly Tarreau <w@1wt.eu>
Thu, 6 Aug 2026 07:25:13 +0000 (09:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Aug 2026 15:59:27 +0000 (17:59 +0200)
commite75361765195646a03772e2d7c1789a5deaac836
tree5ad01e22c126a693edd8792014bb9968f4e324a8
parent1eb9f46e9031e531ce52b6b13a60ae1fdb3a65c6
BUG/MINOR: stats-file: reject tgid 0 when preloading shm objects

When preloading the shared memory stats file at startup,
shm_stats_file_preload() only checked that the tgid read from each
object was not greater than the number of configured thread groups,
but it forgot to also check for zero, which can correspond to an
entry in the process of being reused, and that would cause the
process to crash on startup.

Let's just also test 0. This should be backported to 3.3.

Reported-by: Claude (ANT-2026-71A0JC6Q)
src/stats-file.c