From nobody Sat Apr 11 23:05:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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; dmarc=fail(p=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772605809377953.2464064286135; Tue, 3 Mar 2026 22:30:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxfja-0008Nr-MU; Wed, 04 Mar 2026 01:29:26 -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 1vxfjN-0008Fe-8p; Wed, 04 Mar 2026 01:29:16 -0500 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxfjE-000581-Ez; Wed, 04 Mar 2026 01:29:08 -0500 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 6246SbBN071191 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Mar 2026 15:28:44 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=En1yBiLIRHFeSQzQveGaZuLdWFSDfzKpc6bfIebW9wY=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1772605724; v=1; b=cAIt0G3D1SbGn51Zh68vptPpMasipzrPeyTqgB6hVnqB4r8a9cRKzpJ1enKS3v28 xc8TmlWlw+m3ff2CanBLxm4GRizxtpXMRtqWZm6X0DE9guSgIBm2ojKeQNAmPpF/ eCrlmI4WDpo8StoYLestzRQ9bC5RWbRolNePOgUujqfcWUjEZay2eJlwGgo28a5M Pz2D5S7oh1ukgh5ti2fy+6odOTri47fELs4++Bfl0jHbVzBuT8jOXBgK28ldjfC+ jPlCLTBC8UIZMgq33DN1bQmd7mI9iv9eJllKb+HCQR52+uFHgyoNnRx0JpFewI1n gRV3FN3kS5t5hPEH+KYR5w== From: Akihiko Odaki Date: Wed, 04 Mar 2026 15:28:33 +0900 Subject: [PATCH v3 1/4] contrib/elf2dmp: Grow PDB URL buffer MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260304-nvme-v3-1-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> References: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Viktor Prutyanov , Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Markus Armbruster , Michael Roth , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Keith Busch , Klaus Jensen , Jesper Devantier , qemu-block@nongnu.org, Akihiko Odaki X-Mailer: b4 0.15-dev-5ab4c 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: pass client-ip=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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-ZM-MESSAGEID: 1772605811729158500 The buffers used to construct a PDB URL overflow when the "age" property is greater than 0xf, so grow it. This also simplifies the logic of the URL construction to use one buffer instead of two to avoid the chore to synchronize the sizes of two buffers. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/main.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index d046a72ae67f..a62abadcc049 100644 --- a/contrib/elf2dmp/main.c +++ b/contrib/elf2dmp/main.c @@ -494,18 +494,6 @@ static bool pe_check_pdb_name(uint64_t base, void *sta= rt_addr, return !strcmp(pdb_name, PDB_NAME); } =20 -static void pe_get_pdb_symstore_hash(OMFSignatureRSDS *rsds, char *hash) -{ - sprintf(hash, "%.08x%.04x%.04x%.02x%.02x", rsds->guid.a, rsds->guid.b, - rsds->guid.c, rsds->guid.d[0], rsds->guid.d[1]); - hash +=3D 20; - for (unsigned int i =3D 0; i < 6; i++, hash +=3D 2) { - sprintf(hash, "%.02x", rsds->guid.e[i]); - } - - sprintf(hash, "%.01x", rsds->age); -} - int main(int argc, char *argv[]) { int err =3D 1; @@ -517,9 +505,7 @@ int main(int argc, char *argv[]) uint64_t KernBase; void *nt_start_addr =3D NULL; WinDumpHeader64 header; - char pdb_hash[34]; - char pdb_url[] =3D SYM_URL_BASE PDB_NAME - "/0123456789ABCDEF0123456789ABCDEFx/" PDB_NAME; + g_autofree char *pdb_url =3D NULL; struct pdb_reader pdb; uint64_t KdDebuggerDataBlock; KDDEBUGGER_DATA64 *kdbg; @@ -583,9 +569,21 @@ int main(int argc, char *argv[]) printf("KernBase =3D 0x%016"PRIx64", signature is \'%.2s\'\n", KernBas= e, (char *)nt_start_addr); =20 - pe_get_pdb_symstore_hash(&rsds, pdb_hash); + pdb_url =3D g_strdup_printf("%s" + "%.08x%.04x%.04x" + "%.02x%.02x" + "%.02x%.02x" + "%.02x%.02x" + "%.02x%.02x%.01x" + "%s", + SYM_URL_BASE PDB_NAME "/", + rsds.guid.a, rsds.guid.b, rsds.guid.c, + rsds.guid.d[0], rsds.guid.d[1], + rsds.guid.e[0], rsds.guid.e[1], + rsds.guid.e[2], rsds.guid.e[3], + rsds.guid.e[4], rsds.guid.e[5], rsds.age, + "/" PDB_NAME); =20 - sprintf(pdb_url, "%s%s/%s/%s", SYM_URL_BASE, PDB_NAME, pdb_hash, PDB_N= AME); printf("PDB URL is %s\n", pdb_url); =20 if (!download_url(PDB_NAME, pdb_url)) { --=20 2.53.0 From nobody Sat Apr 11 23:05:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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; dmarc=fail(p=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772605815388725.9013544410608; Tue, 3 Mar 2026 22:30:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxfjc-00005D-BF; Wed, 04 Mar 2026 01:29:28 -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 1vxfjN-0008Fg-7Z; Wed, 04 Mar 2026 01:29:14 -0500 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxfjE-000583-K5; Wed, 04 Mar 2026 01:29:12 -0500 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 6246SbBO071191 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Mar 2026 15:28:44 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=zEGuWpwSPorKgdOr8uqnGxj5GoiSbQsHVJNvDM8QBj0=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1772605724; v=1; b=YBNTs8rQy9azmep5P1sotMZElqJ6Ak5Es/EiAMa/HLH+QKff4GOC1PREjtov+ZYp y1RzCw8ysVL5gx67QBa2pQ6h1BCuPaBP9CUyDYnjEid5L7+XxGqouvznvTFiSGHk cJpGJ/HOTwaCc/kgekiYth31orOWF+HgMf7n0JamAT4jcWfeL9a5uR24DXeWCdN0 FCKgja46SJLMJKKQkC1u+d+R1C0i1dB9ONT89eeL/gpun2279qkjDDMfsZ0XJsec xw5D5KMcP3bUvm8iAL+ODjWZTZhojcKx4UbWRivttQnWr+yMpixmox+OIiLRyMtb /R4SiXv5eL1vgD3Bdz5xsA== From: Akihiko Odaki Date: Wed, 04 Mar 2026 15:28:34 +0900 Subject: [PATCH v3 2/4] vfio/pci: Grow buffer in vfio_pci_host_match() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260304-nvme-v3-2-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> References: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Viktor Prutyanov , Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Markus Armbruster , Michael Roth , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Keith Busch , Klaus Jensen , Jesper Devantier , qemu-block@nongnu.org, Akihiko Odaki , Alex Williamson X-Mailer: b4 0.15-dev-5ab4c 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: pass client-ip=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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-ZM-MESSAGEID: 1772605817352158500 Each field of PCIHostDeviceAddress is an unsigned int, therefore while a valid address is limited to 13 characters, an invalid address could exceed the specified format, up to: ffffffff:ffffffff:ffffffff.ffffffff This requires 36 characters with the terminator. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Williamson --- hw/vfio/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index c89f3fbea348..94c174a773fb 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2739,7 +2739,7 @@ void vfio_pci_post_reset(VFIOPCIDevice *vdev) =20 bool vfio_pci_host_match(PCIHostDeviceAddress *addr, const char *name) { - char tmp[13]; + char tmp[36]; =20 sprintf(tmp, "%04x:%02x:%02x.%1x", addr->domain, addr->bus, addr->slot, addr->function); --=20 2.53.0 From nobody Sat Apr 11 23:05:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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; dmarc=fail(p=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772605820795129.37102182472665; Tue, 3 Mar 2026 22:30:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxfjc-000064-On; Wed, 04 Mar 2026 01:29:28 -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 1vxfjQ-0008Fy-Dd; Wed, 04 Mar 2026 01:29:18 -0500 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxfjE-000580-K0; Wed, 04 Mar 2026 01:29:13 -0500 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 6246SbBP071191 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Mar 2026 15:28:44 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=kEjoFE/z8v1YBz7rlA1tyZsjYl3ZY+R8+UlHKj3jxpQ=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1772605724; v=1; b=Hop2eBHVAochxYlzcSAtBAAV/I6v6yqQ0va1Do2f8eJyYH2O10p8gez4NbG2+uQ6 5HUFALYaTw8vdcbfgZNV95McgaBvPDKNPeqlIawX1mUtkUz76HIrnBNIPj+52Pp+ E3Er3hx0ZMspTTw/kyuy2PZ/Zn8wYcIVezTIiobCTGBypzkOXnxBY2llI+mQ5JXc CDFvs922qou6V+6n4Sgi0zs5zeJ/2KDTgPA2LKF5JNJQvoCKNx/NLTojfpSfNgn6 IfWw49JhLB5xLGteXEBNjnq6X9mZ8Ux3qySTZP1vIwNT9eJgrMT8KFMyeF0SUtKi 8m5aIsTxvyhONo8u9n2LwA== From: Akihiko Odaki Date: Wed, 04 Mar 2026 15:28:35 +0900 Subject: [PATCH v3 3/4] tests: Avoid sprintf() with "%.6f" MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260304-nvme-v3-3-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> References: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Viktor Prutyanov , Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Markus Armbruster , Michael Roth , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Keith Busch , Klaus Jensen , Jesper Devantier , qemu-block@nongnu.org, Akihiko Odaki X-Mailer: b4 0.15-dev-5ab4c 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: pass client-ip=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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-ZM-MESSAGEID: 1772605823022139102 A string that represents a double can be long if it is an exponentially large number. Signed-off-by: Akihiko Odaki Reviewed-by: Markus Armbruster --- tests/unit/test-qobject-input-visitor.c | 8 ++------ tests/unit/test-qobject-output-visitor.c | 7 ++----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/unit/test-qobject-input-visitor.c b/tests/unit/test-qobj= ect-input-visitor.c index 84bdcdf702e0..beee11db4e47 100644 --- a/tests/unit/test-qobject-input-visitor.c +++ b/tests/unit/test-qobject-input-visitor.c @@ -500,7 +500,7 @@ static void test_visitor_in_list_struct(TestInputVisito= rData *data, g_string_append_printf(json, "'number': ["); sep =3D ""; for (i =3D 0; i < 32; i++) { - g_string_append_printf(json, "%s%f", sep, (double)i / 3); + g_string_append_printf(json, "%s%f", sep, (double)i / FLT_RADIX); sep =3D ", "; } g_string_append_printf(json, "], "); @@ -583,11 +583,7 @@ static void test_visitor_in_list_struct(TestInputVisit= orData *data, =20 i =3D 0; for (num_list =3D arrs->number; num_list; num_list =3D num_list->next)= { - char expected[32], actual[32]; - - sprintf(expected, "%.6f", (double)i / 3); - sprintf(actual, "%.6f", num_list->value); - g_assert_cmpstr(expected, =3D=3D, actual); + g_assert_cmpfloat(num_list->value, =3D=3D, (double)i / FLT_RADIX); i++; } =20 diff --git a/tests/unit/test-qobject-output-visitor.c b/tests/unit/test-qob= ject-output-visitor.c index 407ab9ed505a..3c47b28f6638 100644 --- a/tests/unit/test-qobject-output-visitor.c +++ b/tests/unit/test-qobject-output-visitor.c @@ -538,7 +538,7 @@ static void test_visitor_out_list_struct(TestOutputVisi= torData *data, } =20 for (i =3D 31; i >=3D 0; i--) { - QAPI_LIST_PREPEND(arrs->number, (double)i / 3); + QAPI_LIST_PREPEND(arrs->number, (double)i / FLT_RADIX); } =20 for (i =3D 31; i >=3D 0; i--) { @@ -571,12 +571,9 @@ static void test_visitor_out_list_struct(TestOutputVis= itorData *data, i =3D 0; QLIST_FOREACH_ENTRY(qlist, e) { QNum *qvalue =3D qobject_to(QNum, qlist_entry_obj(e)); - char expected[32], actual[32]; =20 g_assert(qvalue); - sprintf(expected, "%.6f", (double)i / 3); - sprintf(actual, "%.6f", qnum_get_double(qvalue)); - g_assert_cmpstr(actual, =3D=3D, expected); + g_assert_cmpfloat(qnum_get_double(qvalue), =3D=3D, (double)i / FLT= _RADIX); i++; } =20 --=20 2.53.0 From nobody Sat Apr 11 23:05:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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; dmarc=fail(p=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772605831915409.76810662936873; Tue, 3 Mar 2026 22:30:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxfjb-0008T2-8Y; Wed, 04 Mar 2026 01:29:27 -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 1vxfjN-0008Ff-8i; Wed, 04 Mar 2026 01:29:16 -0500 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxfjE-000582-Je; Wed, 04 Mar 2026 01:29:12 -0500 Received: from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp [133.11.54.205]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 6246SbBQ071191 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Mar 2026 15:28:44 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=FW1M35ADo1rOGTkjkUKBAtfBI7U6bavuPH5VmSHyiJw=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1772605725; v=1; b=mPgjr0ffes2Huq4KG+MqZOT2GSDkv+KFNnCS4uA1oSbxX5Z/85yPwsZ3N0vYnFKH OXjmI4iI9fOFk9UcVYxWjac3d2T2CWuMtsM+SzvXqldZHctRzcRigkTbOAPBF+5E iCxj8+0TLP6CqrF5/+jkyrbATh7gUPuAZjeLM2SV48NgNUrBK4qegc6vhoBrIImn A3y08yCIY69o+4QJmomTOMbHvWnrayt1+UmjSFbgerK+Ur+FwrJ5HYKJszpj3aaA mrSnOhLClevCePbWI2e9c5E/IVqmcZZxI0Hw213Ex31+GBAypE6+4cFY51udiQin htYrT/GGbV7wFw9G4RbbYQ== From: Akihiko Odaki Date: Wed, 04 Mar 2026 15:28:36 +0900 Subject: [PATCH v3 4/4] meson: Add -Wformat-overflow=2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260304-nvme-v3-4-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> References: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260304-nvme-v3-0-bbb1b7fd2d0b@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: Viktor Prutyanov , Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Markus Armbruster , Michael Roth , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Keith Busch , Klaus Jensen , Jesper Devantier , qemu-block@nongnu.org, Akihiko Odaki X-Mailer: b4 0.15-dev-5ab4c 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: pass client-ip=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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-ZM-MESSAGEID: 1772605833489158500 https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Warning-Options.html > Level 2 warns also about calls that might overflow the destination > buffer given an argument of sufficient length or magnitude. At level > 2, unknown numeric arguments are assumed to have the minimum > representable value for signed types with a precision greater than 1, > and the maximum representable value otherwise. Unknown string > arguments whose length cannot be assumed to be bounded either by the > directive=E2=80=99s precision, or by a finite set of string literals they= may > evaluate to, or the character array they may point to, are assumed to > be 1 character long. Signed-off-by: Akihiko Odaki --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 414c8ea7e280..cf50bc492f9c 100644 --- a/meson.build +++ b/meson.build @@ -692,6 +692,7 @@ warn_flags =3D [ '-Wempty-body', '-Wendif-labels', '-Wexpansion-to-defined', + '-Wformat-overflow=3D2', '-Wformat-security', '-Wformat-y2k', '-Wignored-qualifiers', --=20 2.53.0