haproxy/include
Willy Tarreau d417863828 MINOR: debug: support passing an optional message in ABORT_NOW()
The ABORT_NOW() macro is not much used since we have BUG_ON(), but
there are situations where it makes sense, typically if the program
must always die regardless od DEBUG_STRICT, or if the condition must
always be evaluated (e.g. decompress something and check it).

It's not convenient not to have any hint about what happened there. But
providing too much info also results in wiping some registers, making
the trace less exploitable, so a compromise must be found.

What this patch does is to provide the support for an optional argument
to ABORT_NOW(). When an argument is passed (a string), then a message
will be emitted with the file name, line number, the message and a
trailing LF, before the stack dump and the crash. It should be used
reasonably, for example in functions that have multiple calls that need
to be more easily distinguished.
2024-02-05 17:09:00 +01:00
..
haproxy MINOR: debug: support passing an optional message in ABORT_NOW() 2024-02-05 17:09:00 +01:00
import IMPORT: ebtree: make string_equal_bits() return an unsigned 2024-01-06 13:35:42 +01:00
make BUILD: makefile: also define cmd_CXX to pretty-print C++ build commands 2024-01-26 18:54:23 +01:00