]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: protect dladdr() against reentrant calls from the debug handler
authorWilly Tarreau <w@1wt.eu>
Fri, 4 Apr 2025 16:08:45 +0000 (18:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2025 14:25:47 +0000 (16:25 +0200)
commit2dfb63313b0d2b9d4d636dbd23688d6a20cba2cf
treed108278ae39f9b3a6cec7a234b22615545325f14
parent8d0c6336778fed316a174fd278c78a88f7dd6975
MINOR: tools: protect dladdr() against reentrant calls from the debug handler

If a thread is currently resolving a symbol while another thread triggers
a thread dump, the current thread may enter the debug handler and call
resolve_sym_addr() again, possibly deadlocking if the underlying libc
uses locking. Let's postpone the debug signal delivery in this area
during the call. This will slow the resolution a little bit but we don't
care, it's not supposed to happen often and it must remain rock-solid.
src/tools.c