From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=TAwdMJl+; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 788E45A0265 for ; Fri, 15 May 2026 10:20:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1778833220; bh=4XvAcJYu00ph3Q4P/nXmGsOlyqZZzHIlNtPM6DHru+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TAwdMJl+hdOUShP8/zo8hqvN9g7sfDe3lGFM8Q1NNwk0OaiEwF1YzSDhfg5u6Z6y7 ixVaGMykisRFn+ceDKiMxjuz0fqmvl+CrVYOXsdlXPtWdBQaQCPjNnpGH2xWkHMA3N eSSG4jN+GVn8QjMs4kuuMfSUU/6vt+GNlcICFRskAXSAI5JJASkS6svtN0vbJsHyct hairgyQzvwJKdT5D5IsqLiXst0+SMsLB2GZTEqHsWOKCIYcrQQG0RKiduU/RATKp5N D1fQh3e81Sf0hLa3+G4uoTBqRMiA93UTa05ZZ5Djp1WkMt3HUYWiYvaMv16P4DKPL5 +CMUtbSvV6zxg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gH0W80Gy5z4wCx; Fri, 15 May 2026 18:20:20 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 2/3] Fix build with -DNDEBUG Date: Fri, 15 May 2026 14:13:11 +1000 Message-ID: <20260515041312.317644-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260515041312.317644-1-david@gibson.dropbear.id.au> References: <20260515041312.317644-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: A4X47TXEPYZCS47IA7TDXEMF7LW6FQLW X-Message-ID-Hash: A4X47TXEPYZCS47IA7TDXEMF7LW6FQLW X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jan Palus , David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Since bc872d91765d, our assert() statements are omitted if we compile with -DNDEBUG, like the standard library assert(3). Unfortunately a trivial but embarrassing mistake in that patch means that instead of never aborting in this case, assert_with_msg() *always* aborts, breaking pretty much everything. There's also a missing #include that breaks the build with -DNDEBUG on at least some library versions. Reported-by: Jan Palus Fixes: bc872d91765d ("treewide: Spell ASSERT() as assert()") Signed-off-by: David Gibson --- util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.h b/util.h index 70aadeba..11f71d45 100644 --- a/util.h +++ b/util.h @@ -6,6 +6,7 @@ #ifndef UTIL_H #define UTIL_H +#include #include #include #include @@ -60,7 +61,7 @@ void abort_with_msg(const char *fmt, ...) __func__, __FILE__, __LINE__, STRINGIFY(expr)) #else #define assert_with_msg(expr, ...) \ - ((void)(expr), 0 ? (void)0 : abort_with_msg(__VA_ARGS__)) + ((void)(expr), 1 ? (void)0 : abort_with_msg(__VA_ARGS__)) #endif #ifdef P_tmpdir -- 2.54.0