mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-17 03:00:43 +00:00
d417863828
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. |
||
---|---|---|
.. | ||
haproxy | ||
import | ||
make |