From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=T7yh7JIb; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id D498C5A0262 for ; Sun, 17 May 2026 14:49:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779022163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s/M8QwNUA+CmR5ssTCQ+Q/XitD27U8XC5gwkZ1xLyHY=; b=T7yh7JIbQKlYAD6aG7/Z844qxb6bFMTg0uBXj9y5+5OIQ6/sTFTy2zDFIWXAjs84DahX96 cI/ZvW4O49cIErZBqSiGLTNnKPcqavoKEZ2pxpWSIvHYv+59QoNrqIFve/9vohCtCcrGnh 97FN8IR2MLfRAIFYOoplG6GYw3j07XE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-57-0GE2l3KEOnuYGlaGbv5LjQ-1; Sun, 17 May 2026 08:49:21 -0400 X-MC-Unique: 0GE2l3KEOnuYGlaGbv5LjQ-1 X-Mimecast-MFC-AGG-ID: 0GE2l3KEOnuYGlaGbv5LjQ_1779022160 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-44d83e45febso1671629f8f.0 for ; Sun, 17 May 2026 05:49:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779022159; x=1779626959; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s/M8QwNUA+CmR5ssTCQ+Q/XitD27U8XC5gwkZ1xLyHY=; b=nesWuQ5eA3+jCO0CrfB3L6FarsbYepPA3RQTRna1d7jnh0EqBGJtygxODFXro+H7Va 3mtyFQJzp5Fqzm4PXVOkkJN+s53WHw1ip+n2itOdt8/W7YoTAhXl69PE4aSXVcBYKdXi gcPRJZr6+VppTL+qi415G49F1ttTfpVf7nFvDWbQujyNLStVJOOmkmDIJ0nBzF4v4hBw Dgp10QIJVEb1sPjkUyjXAL0uakMMkuZRWhIyejHEkPn9svgAMGMhfRMfRoJrfuQrx4Rf +W79wdyxMkIfPG/P01fDUBgSDXiwwyzrbxZDai9/cQaTi+UZsVRosHQ+wOfyUDR9jLVD CKmw== X-Gm-Message-State: AOJu0Yx394Lt2iZhip1Ka+3/uVDTwYQkDneuGvLWyMpYNcim9zjcutGo TeU3nZTR4koLnjBitugZB03OQ3chsYcZikfsofqYkFgicGaKJJBsqkrkrSx5DEkXtpbXkTwUlH3 qffqyAj/X6/CCYRltddImnH1g/B3MiKFA6ex4fee+nh/XzWe5NLHj29vE083WCA== X-Gm-Gg: Acq92OEos96bxgGULeryQiuKbqzxXKaraDgzM9FkSmb3AR256sLk8/KtfnWnfMeSlNn tZ0aMqtlfrZBTxOSA8lqAwmcuNbWUbVagtGvrvtYvD/niWCNdigLpbmZELiwRIZRiO5cVN8pJDB pbkzI2HQ+QvWVFIU/4NPjCc1hDJZoIGIDedIFbwWconFZN6tGuYDb7W6ZiG9NlIaMkQ5Hm5ockk Jj2pt0OhOH+Jx4sa4EcU89h5pwFBcptxjkWGDPACIBP1ZhLtJNv345iX9X8E5U3l17SSSFcGA5Q JQVHadav/GGqYRLGwziW9WcoClMlgHoLMzdACdyFBSiXU0AWzM4MFoxyj39x1Kgqd7PEjdWZq5G poI3UnTw5Jmz/7rd/+noRSxN4PTHEfhZJrTopVY8uwq/ut5czDg== X-Received: by 2002:a05:600c:c0d0:b0:48a:761:5816 with SMTP id 5b1f17b1804b1-48fe53774b4mr124629665e9.8.1779022159452; Sun, 17 May 2026 05:49:19 -0700 (PDT) X-Received: by 2002:a05:600c:c0d0:b0:48a:761:5816 with SMTP id 5b1f17b1804b1-48fe53774b4mr124629485e9.8.1779022158958; Sun, 17 May 2026 05:49:18 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48ff2cb4ae0sm66079145e9.0.2026.05.17.05.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 05:49:18 -0700 (PDT) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] util: Fix changes to assert_with_msg() Message-ID: <20260517144916.0bf00ebc@elisabeth> In-Reply-To: <20260517010740.138400-1-david@gibson.dropbear.id.au> References: <20260517010740.138400-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Sun, 17 May 2026 14:49:17 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WGInYbEmLdFS72ePHJufQTkWnxs9tDQxLvWN5VwfUy0_1779022160 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: EE3XCHDBHY7ZEMLKLNTERXLWYQLVVGYP X-Message-ID-Hash: EE3XCHDBHY7ZEMLKLNTERXLWYQLVVGYP X-MailFrom: sbrivio@redhat.com 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: passt-dev@passt.top, Jan Palus 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: [Cc: Jan with full quote] On Sun, 17 May 2026 11:07:40 +1000 David Gibson wrote: > A last minute fixup to commit e51494552b78 was misapplied. Instead of > improving the implementation of assert_with_msg() for the case where > NDEBUG is defined, it effectively eliminated assert_with_msg() in the > normal case where NDEBUG is _not_ defined. As well as removing assert()s > which protect us in case of certian types of bug, this introduces some > cppcheck and clang-tidy regressions. > > Fixes: e51494552b78 ("Fix build with -DNDEBUG") > Signed-off-by: David Gibson Oops, sorry, I think I misread the "#ifndef NDEBUG" and read it as "#ifdef NDEBUG". :( Applied, thanks for spotting this. > --- > util.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/util.h b/util.h > index a9dcc04c..144dc1e6 100644 > --- a/util.h > +++ b/util.h > @@ -51,7 +51,7 @@ void abort_with_msg(const char *fmt, ...) > */ > #ifndef NDEBUG > #define assert_with_msg(expr, ...) \ > - (1 ? (void)0 : ((void)(expr), abort_with_msg(__VA_ARGS__))) > + ((expr) ? (void)0 : abort_with_msg(__VA_ARGS__)) > /* The standard library assert() hits our seccomp filter and dies before it can > * actually print a message. So, replace it with our own version. > */ > @@ -61,7 +61,7 @@ void abort_with_msg(const char *fmt, ...) > __func__, __FILE__, __LINE__, STRINGIFY(expr)) > #else > #define assert_with_msg(expr, ...) \ > - ((void)(expr), 1 ? (void)0 : abort_with_msg(__VA_ARGS__)) > + (1 ? (void)0 : ((void)(expr), abort_with_msg(__VA_ARGS__))) > #endif > > #ifdef P_tmpdir -- Stefano