]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: implement 4 levels of choices between warn and crash.
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Feb 2022 13:59:25 +0000 (14:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Feb 2022 14:00:55 +0000 (15:00 +0100)
commit86bcc53084fb06351353add8881ff4b789ca08cd
tree2f9a40d8fdd771369204bd24289411e7be285152
parentef16578822c9c2d5eb2f1cc33bd78ab4270bd210
DEBUG: implement 4 levels of choices between warn and crash.

We used to have DEBUG_STRICT_NOCRASH to disable crashes on BUG_ON().
Now we have other levels (WARN_ON(), CHECK_IF()) so we need something
finer-grained.

This patch introduces DEBUG_STRICT_ACTION which takes an integer value.
0 disables crashes and is the equivalent of DEBUG_STRICT_NOCRASH. 1 is
the default and only enables crashes on BUG_ON(). 2 also enables crashes
on WARN_ON(), and 3 also enables warnings on CHECK_IF(), and is suited
to developers and CI.
Makefile
include/haproxy/bug.h