get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196514/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196514,
    "url": "http://patchwork.ozlabs.org/api/patches/2196514/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260214131659.31378-2-shentey@gmail.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260214131659.31378-2-shentey@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-14T13:16:57",
    "name": "[1/3] target/i386/emulate/x86_decode: Fix compiler warning",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2c8a04c7dc7c2462a26671063d78649ffdda9049",
    "submitter": {
        "id": 83251,
        "url": "http://patchwork.ozlabs.org/api/people/83251/?format=api",
        "name": "Bernhard Beschow",
        "email": "shentey@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260214131659.31378-2-shentey@gmail.com/mbox/",
    "series": [
        {
            "id": 492172,
            "url": "http://patchwork.ozlabs.org/api/series/492172/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492172",
            "date": "2026-02-14T13:16:58",
            "name": "i386 emulate fixes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492172/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196514/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196514/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=QTQMRFV2;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fCqP332vRz1xwj\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 15 Feb 2026 00:18:47 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vrFWy-0005fH-IU; Sat, 14 Feb 2026 08:17:52 -0500",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <shentey@gmail.com>) id 1vrFWV-0005Tg-LO\n for qemu-devel@nongnu.org; Sat, 14 Feb 2026 08:17:26 -0500",
            "from mail-wm1-x334.google.com ([2a00:1450:4864:20::334])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <shentey@gmail.com>) id 1vrFWS-0007uc-TD\n for qemu-devel@nongnu.org; Sat, 14 Feb 2026 08:17:23 -0500",
            "by mail-wm1-x334.google.com with SMTP id\n 5b1f17b1804b1-4836f363ad2so19516545e9.1\n for <qemu-devel@nongnu.org>; Sat, 14 Feb 2026 05:17:20 -0800 (PST)",
            "from archlinux (dynamic-092-224-176-164.92.224.pool.telefonica.de.\n [92.224.176.164]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43796ac800esm13340471f8f.27.2026.02.14.05.17.17\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 14 Feb 2026 05:17:18 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1771075039; x=1771679839; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=fNoZb4bp9DmDOYZJ/ogzsqn+KnRGtybuYeAcnSj4TvA=;\n b=QTQMRFV25fwdy2wlplrB5rWLdUO+s26wywb6ApTiDlPkgqs8yORGKf5csHCViza5tC\n vqmFHbhFP6Tp+yL+9a+oNHkLwcDqVpXIkGBQgQ4LI5Js6GhPp4/7YIQpe0ZRlGhkTsn8\n +ZEjRhsKsHEc1IHNFUfg1+Xmj2psleiH1mSbXMMVnHJkC7O0besWz081ILKwpfqqlqAJ\n 8SqJgsl4PCAMI8FBtYr8gFaHdAUSmBvB3tfcECH8GORQqMN9awdHh64gaY+UKWfWkeIx\n +n699rkWgGBdM1usqQiQkuVQzk/EI9/rMnJzEs5g535P3et7kbFvoz5BYUaDplUpOL8l\n o5YQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771075039; x=1771679839;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=fNoZb4bp9DmDOYZJ/ogzsqn+KnRGtybuYeAcnSj4TvA=;\n b=CwdvbaY9Yd3IMxY6bhmDtbBvVxdhkp11d2pbr0AsnmPfN/wAgOl4VaJpvNg/miusbw\n IK56A1/wcBdaUa4EVBpYbK8a69N3gGfuPO2GF8MXGXX+ly5lI9SYLSmwBQ/mxYPL6Nz0\n slxUTEFWpV7cbwb2NReWqb8obYK2NxTA8KHAHYn49h8o4qsJDEOdMpMknxtBlQ9hBC8O\n 1cUbU9HGfy02eQNgkgQ8jH7EzuqS2JubAFuBAqwNzYFHMChLAnPubttkrOp8ZOy34XwD\n GuhDlm4WJfPQri0utrstUiJW4DBulT9lYRx+8Vp+uKMEUQumFxv+Ha4+YmvSyP2L3WWE\n swnw==",
        "X-Gm-Message-State": "AOJu0Yy0y2ytOrYxq6V5X8d6barVfI3VzzXTUegiG0008yADFJBFE087\n Zghl622L0WAPJUs14005d0KJxiBs8LWp6dAcHXc4tmJE6rFYaVpBON2zSOGcLw==",
        "X-Gm-Gg": "AZuq6aKIM9kvKTOA7cKR9cERpZYUnMwpUx8IquOcnsAfPK9SFzYic9EoFhS4IL6fXdv\n 7pohsCYfQmlhazAu+YyEyeIxEveuynq6VDUdmIq+YRBld895rkbazAsWmGzxXpgzNDfjhqaJVqs\n RS0A+AS6tTUw/M/f/nnyZVl6n1p759n0YFdtL2KtdQFaBv3eyxxw97bJDCLjhB3Cz/KD7hia1U7\n POqof/eb9vu8HE7fsNKq9UT+PK0maeNTykIROoceACK33U5U2H29BQ8p8U0u/5qFzDHgUxO7gPA\n 0JOM4ZeSSH2tfM3Rxdz39oll7HBeBN2ii2cIDRuoQWQUhz3JSdY9wJrEUqbvu73jc2AB1Zm7+Ji\n C47lo0wxh/id8pcxtWCDTLhrUkJqEzbyHBhXpyhZlYtF9diCMmAEjd9Lx6Ye7P8LNawyhr7xFXy\n xqfN5csnPE9cwpti1Zb83qUBXdViru6WBrehOw1JUcOXjya2QaftyAXXxXYxLJjSL1OsVHIicSK\n ZRnbBTR1vxUyaVo",
        "X-Received": "by 2002:a05:600c:190c:b0:477:5af7:6fa with SMTP id\n 5b1f17b1804b1-48373a59a74mr70610875e9.32.1771075038598;\n Sat, 14 Feb 2026 05:17:18 -0800 (PST)",
        "From": "Bernhard Beschow <shentey@gmail.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Cameron Esfahani <dirty@apple.com>,\n Magnus Kulke <magnuskulke@linux.microsoft.com>,\n Roman Bolshakov <rbolshakov@ddn.com>,\n Phil Dennis-Jordan <phil@philjordan.eu>, Wei Liu <wei.liu@kernel.org>,\n Mohamed Mediouni <mohamed@unpredictable.fr>,\n Bernhard Beschow <shentey@gmail.com>",
        "Subject": "[PATCH 1/3] target/i386/emulate/x86_decode: Fix compiler warning",
        "Date": "Sat, 14 Feb 2026 14:16:57 +0100",
        "Message-ID": "<20260214131659.31378-2-shentey@gmail.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260214131659.31378-1-shentey@gmail.com>",
        "References": "<20260214131659.31378-1-shentey@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::334;\n envelope-from=shentey@gmail.com; helo=mail-wm1-x334.google.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 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": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "When compiling for i386-softmmu under MSYS2, GCC emits the following warning:\n\n  In function 'get_reg_val',\n      inlined from 'calc_modrm_operand64' at ../src/target/i386/emulate/x86_decode.c:1796:15:\n  ../src/target/i386/emulate/x86_decode.c:1703:5: error: 'memcpy' forming offset [4, 7] is out of the bounds [0, 4] of object 'val' with type 'target_ulong' {aka 'unsigned int'} [-Werror=array-bounds=]\n   1703 |     memcpy(&val,\n        |     ^~~~~~~~~~~~\n   1704 |            get_reg_ref(env, reg, rex_present, is_extended, size),\n        |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n   1705 |            size);\n        |            ~~~~~\n  ../src/target/i386/emulate/x86_decode.c: In function 'calc_modrm_operand64':\n  ../src/target/i386/emulate/x86_decode.c:1702:18: note: 'val' declared here\n   1702 |     target_ulong val = 0;\n        |                  ^~~\n\nIn the calc_modrm_operand64() case the compiler sees size == 8 to be mem-copied\nto a target_ulong variable which is only 4 bytes wide in case of i386-softmmu.\nNote that when size != 1, get_reg_ref() always returns a pointer to an 8 byte\nregister, regardless of the target_ulong size. Fix the compiler warning by\nalways providing 8 bytes of storage by means of uint64_t.\n\nFixes: 77a2dba45cc9 (\"target/i386/emulate: stop overloading decode->op[N].ptr\")\ncc: qemu-stable\nSigned-off-by: Bernhard Beschow <shentey@gmail.com>\n---\n target/i386/emulate/x86_decode.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/target/i386/emulate/x86_decode.c b/target/i386/emulate/x86_decode.c\nindex d037ed1142..6ad03b71b0 100644\n--- a/target/i386/emulate/x86_decode.c\n+++ b/target/i386/emulate/x86_decode.c\n@@ -1699,7 +1699,7 @@ void *get_reg_ref(CPUX86State *env, int reg, int rex_present,\n target_ulong get_reg_val(CPUX86State *env, int reg, int rex_present,\n                          int is_extended, int size)\n {\n-    target_ulong val = 0;\n+    uint64_t val = 0;\n     memcpy(&val,\n            get_reg_ref(env, reg, rex_present, is_extended, size),\n            size);\n",
    "prefixes": [
        "1/3"
    ]
}