]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: debug: make sure calls to ha_crash_now() are never merged
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Feb 2024 16:05:36 +0000 (17:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Feb 2024 16:12:06 +0000 (17:12 +0100)
commit2bb192ba911a00d554db592bd5d80ab56e9c7398
tree55e4b54fb9e99a5615315b6c366b4f1db1290ba3
parente06e8a2390c42260e2998c50887a09e1a78f7252
MINOR: debug: make sure calls to ha_crash_now() are never merged

As indicated in previous commit, we don't want calls to ha_crash_now()
to be merged, since it will make gdb return a wrong line number. This
was found to happen with gcc 4.7 and 4.8 in h3.c where 26 calls end up
as only 5 to 18 "ud2" instructions depending on optimizations. By
calling DO_NOT_FOLD() just before provoking the trap, we can reliably
avoid this folding problem. Note that this does not address the case
where abort() is used instead (DEBUG_USE_ABORT).
include/haproxy/bug.h