From nobody Sat Apr 11 23:05:16 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 1772437787091866.914858618938; Sun, 1 Mar 2026 23:49:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vwy1M-00045q-5w; Mon, 02 Mar 2026 02:48:52 -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 1vwy1K-00043V-0c; Mon, 02 Mar 2026 02:48:50 -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 1vwy1H-0001Ap-5w; Mon, 02 Mar 2026 02:48:49 -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 6227mGm2070526 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Mar 2026 16:48:24 +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=1772437704; v=1; b=PotSYLGeNzBXaucBKP+qchrtehxe96x6kzGyvSAHSoGqREV11XXKjmJ96ct6zXUA tSmX4+Ed9QoAAxOQm2hkQeVoALEUmEwbNI3qUxA6DvLWXC3AIq8wS/vaSA7bsv90 7mBH2qHU+r2s6E3fquAY8xQzmghajM9sH2FFYFhNJliAhzhOV5n/KoScCxbNRYQj xnpyvLLWe5f6+SEpXZPXWSSxkuGG1lYS6UaBMyfWCBBWn+C7+9mqnUpao5KkTsbT fGsIBlM/frvRNwzkD0Tw/BV3aiT0JFlCtuqRUYTnKSekoQmwbIM2Fv7yN6jcBaO1 DaBfUQOe5FSa6GH/J/y0TQ== From: Akihiko Odaki Date: Mon, 02 Mar 2026 16:48:08 +0900 Subject: [PATCH v2 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: <20260302-nvme-v2-1-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> References: <20260302-nvme-v2-0-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260302-nvme-v2-0-37ad8b5788c3@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: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.012, RCVD_IN_VALIDITY_RPBL_BLOCKED=1.188, 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: 1772437791424158500 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:16 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 177243779045295.1569746111661; Sun, 1 Mar 2026 23:49:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vwy1N-00046k-VM; Mon, 02 Mar 2026 02:48:53 -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 1vwy1K-00043o-98; Mon, 02 Mar 2026 02:48:50 -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 1vwy1H-0001Al-5r; Mon, 02 Mar 2026 02:48:50 -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 6227mGm3070526 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Mar 2026 16:48:24 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=yz1K3mW2WUc23Qlepl8xm/wGyRdafvoJCT/tVVjXyIs=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1772437704; v=1; b=hy5umFdPZ50SJiAQtbM3y4dN/X/n1wwlipIjjUbgu7d071XMvpuWpkzzuNuiRwN1 KCRxZKD9bhHMFZM+dGC6n14w98Fvf+zA5gN23g3GlrvpazxhQ5UAQrD5JkpWKxOW cd/Kj7lW0dvIFoTzGm2I3zwUltxlKU282z4YZEz4b7NFWX6KjVg0Z65qfVWT42lf AWMEmYyP5UIaZb9ZCqlmg3qK1GEPnzXj51wPLndMvBdQAZyVjGcmrLjltDTma2Xs AbNKWVpkEYLnYeZaJFqHdiePDMOecvmqd/d3ifjPqSshbhxv6S45qEiM1dEjG7AN q5i5g0xvKP6f3BL+TcwkCA== From: Akihiko Odaki Date: Mon, 02 Mar 2026 16:48:09 +0900 Subject: [PATCH v2 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: <20260302-nvme-v2-2-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> References: <20260302-nvme-v2-0-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260302-nvme-v2-0-37ad8b5788c3@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: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.012, RCVD_IN_VALIDITY_RPBL_BLOCKED=1.188, 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: 1772437791396158500 Ensure the buffer in vfio_pci_host_match() will not overflow even when an invalid addr parameter is provided. 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:16 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 17724378172601003.2663255816705; Sun, 1 Mar 2026 23:50:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vwy1L-00044E-Ba; Mon, 02 Mar 2026 02:48:51 -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 1vwy1J-00043N-Pm; Mon, 02 Mar 2026 02:48:49 -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 1vwy1H-0001Am-7g; Mon, 02 Mar 2026 02:48:49 -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 6227mGm4070526 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Mar 2026 16:48:24 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=Jg8pBL9N8Me78JTlFJP0CdfZhypMtDA3Z4/iYnRGLG4=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1772437704; v=1; b=ufG0hRT7jY+ZsTmItrvKDlpNV//OOUABmDvy5Lug19Y+3XBIa5GtHlCJrG4aExUX rxQGcc9s/UoOLz0x9OOzF0xo6unWKm2IGMZnfj7Ycb7CaV5CDzLy9djkCSjozBg/ KlIDiZPqIXa/2w0v57pv9S0OuJ6MZQwpI0uNzBDtmkTTVoqCI803IoB8ITFOAtXW qQIofwB/8bjSOY61JUHX9b+SnrlHnbodcZZumKISTImqMN1y82m2vaMSEKZWeBmX 2t+sP8VOPRlOC/TBxbT3k5bJ9MS90ScOIrJfyzKTlpDdzR/0NkIjt3Lp1qj9MtXP fumiAUmBOmC0Q3Fsm5wFrg== From: Akihiko Odaki Date: Mon, 02 Mar 2026 16:48:10 +0900 Subject: [PATCH v2 3/4] tests: Grow buffers for double string MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260302-nvme-v2-3-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> References: <20260302-nvme-v2-0-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260302-nvme-v2-0-37ad8b5788c3@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: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.012, RCVD_IN_VALIDITY_RPBL_BLOCKED=1.188, 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: 1772437819534158500 A string that represents a double can be long if it is an exponentially large number. Signed-off-by: Akihiko Odaki --- tests/unit/test-qobject-input-visitor.c | 2 +- tests/unit/test-qobject-output-visitor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test-qobject-input-visitor.c b/tests/unit/test-qobj= ect-input-visitor.c index 84bdcdf702e0..baff9243313c 100644 --- a/tests/unit/test-qobject-input-visitor.c +++ b/tests/unit/test-qobject-input-visitor.c @@ -583,7 +583,7 @@ static void test_visitor_in_list_struct(TestInputVisito= rData *data, =20 i =3D 0; for (num_list =3D arrs->number; num_list; num_list =3D num_list->next)= { - char expected[32], actual[32]; + char expected[318], actual[318]; =20 sprintf(expected, "%.6f", (double)i / 3); sprintf(actual, "%.6f", num_list->value); diff --git a/tests/unit/test-qobject-output-visitor.c b/tests/unit/test-qob= ject-output-visitor.c index 407ab9ed505a..ae05a726f775 100644 --- a/tests/unit/test-qobject-output-visitor.c +++ b/tests/unit/test-qobject-output-visitor.c @@ -571,7 +571,7 @@ static void test_visitor_out_list_struct(TestOutputVisi= torData *data, i =3D 0; QLIST_FOREACH_ENTRY(qlist, e) { QNum *qvalue =3D qobject_to(QNum, qlist_entry_obj(e)); - char expected[32], actual[32]; + char expected[318], actual[318]; =20 g_assert(qvalue); sprintf(expected, "%.6f", (double)i / 3); --=20 2.53.0 From nobody Sat Apr 11 23:05:16 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 1772437786997665.5522173204788; Sun, 1 Mar 2026 23:49:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vwy1M-000464-Ae; Mon, 02 Mar 2026 02:48:52 -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 1vwy1K-00043Y-4h; Mon, 02 Mar 2026 02:48:50 -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 1vwy1H-0001Ao-5e; Mon, 02 Mar 2026 02:48:49 -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 6227mGm5070526 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Mar 2026 16:48:24 +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=1772437704; v=1; b=g0mMfkqH1giUnPHksnEcntq7Oe43sBXylkZZgun28Fw3iWAJp971d5FgfLJSc/Xt xLXq4m//LRpGxIbH8qNzyWl29k5c6XCw0fYfgoX84Z6LqQFC/g+JByiAjwBRxRdH KvjG7L0dOcqr+AXUkQzSeFGkboJKkO2anVPjE0SlyZxSYe92OFRWBbK+I0Whkoyd gEeZ+Xtx3b4xQckeKNPlnpk+v+bOGIaEvo0Xf4TTip8eegODuDZnOvQZ/JoqChpK gEqKdCapRyySr+vPj3e8HHz9T8XdcS99fkF70qwUhjowQPCZhIhFQNLlgGv1k7CL yCj91iQF+u80ZXcgrNxyoA== From: Akihiko Odaki Date: Mon, 02 Mar 2026 16:48:11 +0900 Subject: [PATCH v2 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: <20260302-nvme-v2-4-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> References: <20260302-nvme-v2-0-37ad8b5788c3@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20260302-nvme-v2-0-37ad8b5788c3@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: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.012, RCVD_IN_VALIDITY_RPBL_BLOCKED=1.188, 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: 1772437791443158500 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