get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218893,
    "url": "http://patchwork.ozlabs.org/api/patches/2218893/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/orpl4i5d7e.fsf@lxoliva.fsfla.org/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<orpl4i5d7e.fsf@lxoliva.fsfla.org>",
    "list_archive_url": null,
    "date": "2026-04-02T02:05:25",
    "name": "c++: coroutines: initialize refcount",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c5d35a22e1cb013786c1ffef305049e5a65c3c33",
    "submitter": {
        "id": 74937,
        "url": "http://patchwork.ozlabs.org/api/people/74937/?format=api",
        "name": "Alexandre Oliva",
        "email": "oliva@adacore.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/orpl4i5d7e.fsf@lxoliva.fsfla.org/mbox/",
    "series": [
        {
            "id": 498417,
            "url": "http://patchwork.ozlabs.org/api/series/498417/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498417",
            "date": "2026-04-02T02:05:25",
            "name": "c++: coroutines: initialize refcount",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498417/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218893/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218893/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=AyevstBd;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (2048-bit key,\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=AyevstBd",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=adacore.com",
            "sourceware.org; spf=pass smtp.mailfrom=adacore.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=74.125.82.49"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmQFT2B1Rz1yFv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 13:06:21 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 69B244BA23C5\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 02:06:19 +0000 (GMT)",
            "from mail-dl1-f49.google.com (mail-dl1-f49.google.com\n [74.125.82.49])\n by sourceware.org (Postfix) with ESMTPS id 4FC494BA2E3E\n for <gcc-patches@gcc.gnu.org>; Thu,  2 Apr 2026 02:05:48 +0000 (GMT)",
            "by mail-dl1-f49.google.com with SMTP id\n a92af1059eb24-126ea4b77adso674069c88.1\n for <gcc-patches@gcc.gnu.org>; Wed, 01 Apr 2026 19:05:48 -0700 (PDT)",
            "from free.home ([2804:14c:4d1:41a6::1455])\n by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2ca7d00f5easm1138733eec.29.2026.04.01.19.05.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 01 Apr 2026 19:05:46 -0700 (PDT)",
            "from livre (livre.home [172.31.160.2])\n by free.home (8.15.2/8.15.2) with ESMTPS id 63225PC8118480\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Wed, 1 Apr 2026 23:05:25 -0300"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 69B244BA23C5",
            "OpenDKIM Filter v2.11.0 sourceware.org 4FC494BA2E3E"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 4FC494BA2E3E",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 4FC494BA2E3E",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775095548; cv=none;\n b=wGdYG3JrpVUl5L2Hx9ESqxrdmL6xKX+l3570qlS4rSWECt8HzRQWhvmi7KcZnF+Tz9i0ybS+UOFCewWdmWo9QHJdTBtbE80tJ42clSq/kXyBoBr6SKSnXNYMsy/gxFMEAhO1MbOGpsn8Z4nkm3nB1nPb8uCvbbM8f0R0IdCuj0s=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775095548; c=relaxed/simple;\n bh=BFdED8iRdPB8QkCv8Sp2NZd9lGtSgHTDVHB7brUPIVg=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=jIMl1OXdkFDYN0VORyFqDsCPOoyuxvhmZwZq+E5zRaYSw8A/geyTz6AG3te7R2sBK88fbFcfM18Aq58mgGRxiUqdBbNz4j2J0PHlkl5t2l23g7No7mcs3HTm4VrAD5yJBagAQKJ4OxKxIycRENKuwGuk5F2+8WbnEV3sqXFP15o=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=adacore.com; s=google; t=1775095547; x=1775700347; darn=gcc.gnu.org;\n h=mime-version:user-agent:message-id:date:organization:subject:cc:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=kpdPmuqOTUB+F1OrOUQA9vFUN/pg/Q7XvQ7kA6/LLJ4=;\n b=AyevstBd98PO3l1qllp9oJtXPRqtbo5sH5Z55PyDqeHcVOZj3C075On/pjiIEtuSjK\n 4x0S9A/9sDnER/C2tsQkPlCmlNmrMjjai3a1pUPhJoqO8trG1cL1jZ+zumbcWw7x2BcC\n BiRm5yl/HzkXUsreZkahN4I/m9Mhk49w03KRtJMeaFKRGQ+yHQEmxXPI1PH47Byh+SmH\n nPBZ0Ldf0CV1GnqNSwEwgeezSl8X1K9uQ/S1GnqfkJ982FamNAxL0xAXRMFyx1t263b1\n z7hnlB03PporUYpjCWKADwUsogYqY4dJGtU8lA7kyFLN89PdjM3PGGbWmf+19ef5Ce2h\n q/CQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775095547; x=1775700347;\n h=mime-version:user-agent:message-id:date:organization:subject:cc:to\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=kpdPmuqOTUB+F1OrOUQA9vFUN/pg/Q7XvQ7kA6/LLJ4=;\n b=qpR5n4PvbIMmWxOYtIp00XRMGizNl5CuIW6k/Oar6ZxPWYYnTej94aLP7ZZygL9/rp\n GkE4yicP/EXizEzvCMCDhS3lOwONBOV5lBU7FGwC7zYqx2lG0YLDG9odYmLDqFMvD6ip\n kJddR/x05KJe+dGN5h//jt6gt6OHEL9AyvPoSB2Os1e6I/TX72GC33E/y+1AoblLbDE9\n Zx6rtTYAxXtb7JMcp/gWwpCQjrf+dSxM5wRb9Khu5qOX9Hs0oFkOWZgEb40nLFOehxJW\n UASEw3r5DMv66ZaTxiq+LQG58RM1KmwFXaIjCzp5tk+6uNSG4rxF7QKsrKsi/aL1C6ng\n A4/Q==",
        "X-Gm-Message-State": "AOJu0YwdxpqC2GNVlBw5I0aZj1zzmywhUlycteE4FMQKStLK0W4AbUgA\n fM74vo0f72BP2EGMBlEDCtnMCijJJy5Ii4HPHYU2xft9u4E9ff+HJFpj8pglQcslWiv5DSf+qcL\n 6RO0=",
        "X-Gm-Gg": "ATEYQzyNpCWjJaZ3lXfRsT5/W3ULC2Joi8UKtSmmSozyeBEMAn7BoEX2mXTBIgVhTr8\n Ps6eC3lE1xf7IqOA4G8z3OtLx04rCa2ohI4TTTgw2jbDuGoJeGEmH/IcfUPe5rEXi4mNJTrJJa5\n wuTcHyYjLh0+X+0eD2Ze1lMCoLxebhsOAV8VU9JtwPLSt0iZXS5HrDsuvbQKDeBjYDu02f47qAX\n MtsATDn9HrwktIifR8d+psOW4vqbMu9HD/Nay1dk3KaaFc0jUmuNUAXMDPurLa85H1dI5SJ1ngp\n zJC7vwHcFZu0XJCTXArsqzVyCqYEHBZwlvdgaYhaY0XHmgwLWEVl1LKJjCSqPWHGdb6PavbOYRV\n q9uhgja8Qz8qJHoYp2rgUfX7EhbzlXhpS7/2Foogxbix6QhmAIZY3fbYe+IucFUS7jWpyUtvQx1\n w=",
        "X-Received": "by 2002:a05:7301:608a:b0:2c1:7afc:df06 with SMTP id\n 5a478bee46e88-2ca8d488fc1mr869471eec.5.1775095546832;\n Wed, 01 Apr 2026 19:05:46 -0700 (PDT)",
        "From": "Alexandre Oliva <oliva@adacore.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Jason Merrill <jason@redhat.com>, Nathan Sidwell <nathan@acm.org>,\n Iain Sandoe <iain@sandoe.co.uk>",
        "Subject": "[PATCH] c++: coroutines: initialize refcount",
        "Organization": "Free thinker, does not speak for AdaCore",
        "Date": "Wed, 01 Apr 2026 23:05:25 -0300",
        "Message-ID": "<orpl4i5d7e.fsf@lxoliva.fsfla.org>",
        "User-Agent": "Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Scanned-By": "MIMEDefang 2.84",
        "X-BeenThere": "gcc-patches@gcc.gnu.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>",
        "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>",
        "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "If the promise ctor throws, the EH cleanup will access refcount before\nit is initialized.  Initialize it to zero so that cleanups can take\nplace.\n\nThis seems very hard to hit on systems that ensure the stack starts\nout zero-initialized, but on VxWorks in kernel mode, this hits more\noften than not on various architectures.\n\nRegstrapping on x86_64-linux-gnu.  Already tested on x86_64-vx7r2, where\npr95615-01-promise-ctor-throws.C went down from a 77% failure rate to no\nfailure whatsoever in 512 runs.  Ok to install?\n\n\nfor  gcc/cp/ChangeLog\n\n\t* coroutines.cc (cp_coroutine_transform::build_ramp_function):\n\tZero-initialize refcount.\n---\n gcc/cp/coroutines.cc |    4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc\nindex b884f8078e096..3de0d556a84ad 100644\n--- a/gcc/cp/coroutines.cc\n+++ b/gcc/cp/coroutines.cc\n@@ -5123,7 +5123,9 @@ cp_coroutine_transform::build_ramp_function ()\n   tree coro_frame_refcount\n     = coro_build_and_push_artificial_var_with_dve (loc, coro_frame_refcount_id,\n \t\t\t\t\t\t   short_unsigned_type_node,\n-\t\t\t\t\t\t   orig_fn_decl, NULL_TREE,\n+\t\t\t\t\t\t   orig_fn_decl,\n+\t\t\t\t\t\t   build_int_cst\n+\t\t\t\t\t\t   (short_unsigned_type_node, 0),\n \t\t\t\t\t\t   deref_fp);\n   /* Cleanup if both the ramp and the body have finished.  */\n   tree cond\n",
    "prefixes": []
}