]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stats-file: fix shm-stats-file preload not working anymore
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 11 Nov 2025 21:28:53 +0000 (22:28 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 11 Nov 2025 21:36:17 +0000 (22:36 +0100)
commit3262da84ea2a8d657737f01ef045253ad199a3db
treece565bc871134c51d5f6819fa6fbb4bba6136243
parenta2878415785c8e3e3aa1953e117aaba2f527fc7f
BUG/MEDIUM: stats-file: fix shm-stats-file preload not working anymore

Due to recent commit 5c299dee ("MEDIUM: stats: consider that shared stats
pointers may be NULL") shm-stats-file preloading suddenly stopped working

In fact preloading should be considered as an initializing step so the
counters may be assigned there without checking for NULL first.
Indeed there are supposed to be NULL because preloading occurs before
counters_{fe,be}_shared_prepare() which takes care of setting the pointers
for counters if they weren't set before.

Obviously this corner-case was overlooked during 5c299dee writing and
testing. Thanks to Nick Ramirez for having reported the issue.

No backport needed, this issue is specific to 3.3.
src/stats-file.c