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)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 18 Mar 2025 15:12:48 +0000 (16:12 +0100)
commit63a8e8802e357a3d1dc7ec7e3a50a402de568a0e
treeb6b5010f6abc703a0cc4a0c9f6f4a0b79375f9ed
parent4c6bd50e1742189e947bad914169a774ffa2d3b9
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>
(cherry picked from commit 0ce82061f72bf7f0c1341cdca2f9e90f03437aa4)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
src/mux_h1.c