From 2897b2681f2dbf12b04ed36b5d83ffb32972a602 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 11 Aug 2026 17:20:21 +0200 Subject: [PATCH] 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. --- include/haproxy/bug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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__); \ } \ } -- 2.47.3