BUG/MINOR: mux-h1: always make sure h1s->sd exists in h1_dump_h1s_info()
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2025 10:31:36 +0000 (11:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 28 Feb 2025 15:25:56 +0000 (16:25 +0100)
commit0ce82061f72bf7f0c1341cdca2f9e90f03437aa4
tree492392695bde3fac8af91605d4d312ab4e228eaf
parente96a1a644bc4e3acee7af79dd2c0888b902c90c3
BUG/MINOR: mux-h1: always make sure h1s->sd exists in h1_dump_h1s_info()

This function may be called from a signal handler during a warning,
a panic or a show thread. We need to be more cautious about what may
or may not be dereferenced since an h1s is not necessarily fully
initialized. Loops of "show threads" sometimes manage to crash when
dereferencing a null h1s->sd, so let's guard it and add a comment
remining about the unusual call place.

This can be backported to the relevant versions.

(cherry picked from commit a56dfbdcb4cb3eb9ffd3db641efb3e5605a6c3f0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/mux_h1.c