From nobody Wed Nov 27 04:58:44 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1700479468; cv=none; d=zohomail.com; s=zohoarc; b=ZK3J14gsoL/4CKMP7TxxKdOWYmeMMOEo17xWZYolfSNB00BT3XDGmK59DGdiHFHMpWxQe0yR0YrrRMnyXUXRaIslyWEWkAeszGvVYMQtyv/o438ZZua9inZtpB1oGDi6/Qgb3BvO0eA5Uynyql8OzsTScLF7wBofZEz03ayRYxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700479468; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:Message-Id:Reply-To:To; bh=bR4kc8wOrFfjmtOt3ZkWz10Jcqjs8BczuOQt6Gw4Imw=; b=i0KfRcmhqDDGIwLFRVdTZAncujb94MwRT0c9hZYQArrqN4z8zXH/YW0fFE4GOQEXIlIj3bLfpA+c8ctQKxkwu9JdJgvm7OWhU1TjuERNPIWc9eSj3YEFLgLhHJfc/Lzhsl/MYL7mDBsqeRyvm/CNDqKYzq47nK1vCXkxYO6ka/U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1700479468213915.2186945884196; Mon, 20 Nov 2023 03:24:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r52Nw-0004Em-QW; Mon, 20 Nov 2023 06:24:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r52Np-0004D1-2p for qemu-devel@nongnu.org; Mon, 20 Nov 2023 06:24:05 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r52Nj-00077P-LE for qemu-devel@nongnu.org; Mon, 20 Nov 2023 06:24:02 -0500 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1cc1ee2d8dfso37607475ad.3 for ; Mon, 20 Nov 2023 03:23:57 -0800 (PST) Received: from localhost ([157.82.205.15]) by smtp.gmail.com with UTF8SMTPSA id p3-20020a17090ab90300b00285125abb33sm3450621pjr.4.2023.11.20.03.23.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 03:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1700479436; x=1701084236; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bR4kc8wOrFfjmtOt3ZkWz10Jcqjs8BczuOQt6Gw4Imw=; b=ULdsyoXGw1L/b7wjc4GrCPbpyZEgQrv4s6Lf3Ku3iI+wJ8pdm1VijyX0OJSHmikmpg BASHT3CqHjm0opAcgSaNcrACXwSDhP3PeT9gCMFgCFxjhVjgif74vbD4AEPAi8/l3pII QmC6m9k4gWlXErefD3SNEzppcXOBl5CN8scEOiKxO5dwZgiUKLwfLRYoNPNPMbe+8xzu z7t4zSfYpR0gbWm+Ij44l9Hmf0spb6BI7smwUO3Ehu9TIDLbRTb20VQOpzI4ySmupcnE VXRc86XOgw13WYBCv9wn4EufjKo470185SBlD3OFNJCaE9lsdMaojd9fmdhvXDPRefTm PemA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700479436; x=1701084236; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bR4kc8wOrFfjmtOt3ZkWz10Jcqjs8BczuOQt6Gw4Imw=; b=l5hmZvUFQJKZRRXw8pPkH6wf2t4HdYFo2dioauaF+PqetvP9ehoA8dDt+EITvaR2os S7W6nV3Vh3NORmdknuucfav0KgPM9/YwHQDiBx2p3ntmEW8fW1nIXT6NF2v/ihdZVxXd rFbWsbuen7WtGfkMxqJrdlvCFugZylcMmL3+ycEEopY4Qj7nrXyDGzFPR4JAWp2ViiUD z8tss/u5/T8taCJfU480AozepnR1h5cFleChFliY7CamsPsIqIK/k9Pgq5NdXuFql44/ 3ZJ4+aoVzVsjncDoZ3/zIz72wgQs3XBcVhifvxDw038CIvWgucnhTBCMZDgPFYpF7l7I Dl5g== X-Gm-Message-State: AOJu0YxMJuZ0Ln0MU3mmmrpgcwtBEb/mIj+jaCod6ZV9ZUyxdnTmW9i7 kqBuM9okUlwPShw4kjzvQmOSHQ== X-Google-Smtp-Source: AGHT+IFpdxjbHJyzV6/yzAGAq/OE0TyL7GpGcANgD5c8ClPhhp0IFaY330I7o6KNAAnWL6AhpfjqRA== X-Received: by 2002:a17:90b:1b12:b0:283:3f5f:b29b with SMTP id nu18-20020a17090b1b1200b002833f5fb29bmr7129350pjb.27.1700479436455; Mon, 20 Nov 2023 03:23:56 -0800 (PST) From: Akihiko Odaki To: Cc: Akihiko Odaki , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Subject: [PATCH] meson: -Wno-error=format-overflow for ubsan Date: Mon, 20 Nov 2023 20:23:26 +0900 Message-ID: <20231120112329.4149-1-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::62f; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1700479468660100001 ubsan causes wrong -Wformat-overflow warnings as follows: In file included from /usr/include/stdio.h:906, from /home/alarm/q/var/qemu/include/qemu/osdep.h:114, from ../disas/cris.c:21: In function 'sprintf', inlined from 'format_dec' at ../disas/cris.c:1737:3, inlined from 'print_with_operands' at ../disas/cris.c:2477:12, inlined from 'print_insn_cris_generic.constprop' at ../disas/cris.c:269= 0:8: /usr/include/bits/stdio2.h:30:10: warning: null destination pointer [-Wform= at-overflow=3D] 30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 31 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ Don't let these errors stop the build. Signed-off-by: Akihiko Odaki --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d7d841e71e..02f1a18080 100644 --- a/meson.build +++ b/meson.build @@ -365,7 +365,9 @@ if get_option('sanitizers') # Detect static linking issue with ubsan - https://gcc.gnu.org/bugzilla/= show_bug.cgi?id=3D84285 if cc.links('int main(int argc, char **argv) { return argc + 1; }', args: [qemu_ldflags, '-fsanitize=3Dundefined']) - qemu_cflags =3D ['-fsanitize=3Dundefined'] + qemu_cflags + # 87884 =E2=80=93 ubsan causes wrong -Wformat-overflow warning + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D87884 + qemu_cflags =3D ['-fsanitize=3Dundefined', '-Wno-error=3Dformat-overfl= ow'] + qemu_cflags qemu_ldflags =3D ['-fsanitize=3Dundefined'] + qemu_ldflags endif endif --=20 2.42.1