From: Willy Tarreau Date: Tue, 11 Aug 2026 15:20:21 +0000 (+0200) Subject: CLEANUP: debug: make __BUG_ON() use abort_with_line() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2897b2681f2dbf12b04ed36b5d83ffb32972a602;p=thirdparty%2Fhaproxy.git CLEANUP: debug: make __BUG_ON() use abort_with_line() ABORT_NOW() with no arg is strictly equivalent to abort_with_line(__LINE__) so let's do it explicitly, not only it clarifies the code, but it also reduces the size of the developed macros, which does count, considering the number of BUG_ON() in the code. --- diff --git a/include/haproxy/bug.h b/include/haproxy/bug.h index 8d7776224..f78dadcf4 100644 --- a/include/haproxy/bug.h +++ b/include/haproxy/bug.h @@ -370,7 +370,7 @@ extern __attribute__((__weak__)) struct debug_count __stop_dbg_cnt HA_SECTION_S if (_details & (DBG_DET_FAT_FATL|DBG_DET_FAT_WARN)) \ ha_backtrace_to_stderr(!!(_details & DBG_DET_FAT_FATL)); \ if (_details & DBG_DET_FAT_FATL) \ - ABORT_NOW(); \ + abort_with_line(__LINE__); \ } \ } @@ -430,7 +430,7 @@ extern __attribute__((__weak__)) struct debug_count __stop_dbg_cnt HA_SECTION_S if (details & (DBG_DET_FAT_FATL|DBG_DET_FAT_WARN)) \ ha_backtrace_to_stderr(!!(details & DBG_DET_FAT_FATL)); \ if (details & DBG_DET_FAT_FATL) \ - ABORT_NOW(); \ + abort_with_line(__LINE__); \ } \ }