mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-17 00:41:00 +01:00
Change the algorithm for the generation of the user messages context prefix. Remove the dubious API relying on optional printf positional arguments. This may be non portable, and in fact the CI glibc crashes with the following error when some arguments are not present in the format string : "invalid %N$ use detected". Now, a fixed buffer attached to the context instance is allocated once for the program lifetime. Then call repeatedly snprintf with the optional arguments of context if present to build the context string. The buffer is deallocated via a per-thread free handler. This does not need to be backported.