get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196342,
    "url": "http://patchwork.ozlabs.org/api/patches/2196342/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260213133102.896384-1-dmalcolm@redhat.com/",
    "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": "<20260213133102.896384-1-dmalcolm@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-13T13:31:02",
    "name": "[pushed:,r16-7500] diagnostics: don't cache logical_loc_mgr in html_sink [PR124014]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f1afcc01b037ea19905515a365297ceeb9788e0e",
    "submitter": {
        "id": 24465,
        "url": "http://patchwork.ozlabs.org/api/people/24465/?format=api",
        "name": "David Malcolm",
        "email": "dmalcolm@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260213133102.896384-1-dmalcolm@redhat.com/mbox/",
    "series": [
        {
            "id": 492098,
            "url": "http://patchwork.ozlabs.org/api/series/492098/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=492098",
            "date": "2026-02-13T13:31:02",
            "name": "[pushed:,r16-7500] diagnostics: don't cache logical_loc_mgr in html_sink [PR124014]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492098/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196342/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196342/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=CgpLUquA;\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 (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=CgpLUquA",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "sourceware.org; spf=pass smtp.mailfrom=redhat.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124"
        ],
        "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 4fCCkZ2Z7Rz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 00:31:50 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 447204B9DB54\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 13:31:48 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 9E44E4B9DB66\n for <gcc-patches@gcc.gnu.org>; Fri, 13 Feb 2026 13:31:08 +0000 (GMT)",
            "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-375-Po00oYooN_OcSBR9xJOtGQ-1; Fri,\n 13 Feb 2026 08:31:06 -0500",
            "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 0B55A18002CE\n for <gcc-patches@gcc.gnu.org>; Fri, 13 Feb 2026 13:31:06 +0000 (UTC)",
            "from t14s.localdomain.com (unknown [10.22.80.18])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 5409A1800465; Fri, 13 Feb 2026 13:31:05 +0000 (UTC)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 447204B9DB54",
            "OpenDKIM Filter v2.11.0 sourceware.org 9E44E4B9DB66"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 9E44E4B9DB66",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 9E44E4B9DB66",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770989468; cv=none;\n b=R3nSbIBYShx19LyGqPP9M1TIuaI1KEzvhbc93NDvMa9vHPytals4bRffyPIwnJdyy1YxoJK/X5Yay0BAUvLUiooCgHePJ3vbHGB63Kywzmbs0RWzga2oujtJq9HmLqVGxYspsYovBVCPjTMjcf4qXSgguYWcKhNgHkns1FhR4Kw=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770989468; c=relaxed/simple;\n bh=VcSHBZMnD2Xkbk9hnLj6EQ/Y0oLvWmlxVRc8WBUK/Ao=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=jh2wizan+aQU7EYM15OClnI8V9YBKj0vle3imoaywIOMAFtxWrL37CCAlbpPohyRsA3dKFqk4oj6rqYNpn/YLJUXePizFdMxWDpO3TlQFpH0OwHc0NVUt5ABWLMiYWSh5XdPpDhZLve+6OPHNVJVNWzrFfYY7R5qYpmUuKN5mkQ=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770989468;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=18cdj5ebkhpm5QbEIdcPacVBu456iTHQIXWExy7jBgM=;\n b=CgpLUquAteOPJo1B2EsSVrfLqggV86lRFv/sXSiGbrcudg5VD09JtNaGUK8jOJQzx2Han9\n IQgwUvosVNxpdTNHv1LmOHYGmmsWa+B1o8BPG5kpK5iRIF3OifzaNjbhNhQWM9iCgFABRz\n ACFoXfalZ33oSoFF3TQg+ivII++ybWM=",
        "X-MC-Unique": "Po00oYooN_OcSBR9xJOtGQ-1",
        "X-Mimecast-MFC-AGG-ID": "Po00oYooN_OcSBR9xJOtGQ_1770989466",
        "From": "David Malcolm <dmalcolm@redhat.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "David Malcolm <dmalcolm@redhat.com>",
        "Subject": "[pushed: r16-7500] diagnostics: don't cache logical_loc_mgr in\n html_sink [PR124014]",
        "Date": "Fri, 13 Feb 2026 08:31:02 -0500",
        "Message-ID": "<20260213133102.896384-1-dmalcolm@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "7L4LGMOIF16Zg3nN4z7t0FCEmvXBI2FJaUoHfpHdMWI_1770989466",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "r16-7422-g13c2da6cdbd1a3 fixed an ICE that was due to caching of the\nlogical_locations::manager * in sarif_sink.\n\nDo the same for html_sink.\n\nSuccessfully bootstrapped & regrtested on x86_64-pc-linux-gnu.\nPushed to trunk as r16-7500-g5885a8815344a2.\n\ngcc/ChangeLog:\n\tPR diagnostics/124014\n\t* diagnostics/html-sink.cc (html_builder::get_logical_loc_mgr):\n\tNew.\n\t(html_builder::m_logical_loc_mgr): Drop field.\n\t(html_builder::html_builder): Drop initialization of\n\tm_logical_loc_mgr.\n\t(html_builder::maybe_make_state_diagram): Use get_logical_loc_mgr\n\trather than m_logical_loc_mgr.\n\t(html_builder::make_element_for_diagnostic): Likewise.\n\nSigned-off-by: David Malcolm <dmalcolm@redhat.com>\n---\n gcc/diagnostics/html-sink.cc | 22 ++++++++++++----------\n 1 file changed, 12 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/gcc/diagnostics/html-sink.cc b/gcc/diagnostics/html-sink.cc\nindex 33cbb8c241326..f2d5917e2ed92 100644\n--- a/gcc/diagnostics/html-sink.cc\n+++ b/gcc/diagnostics/html-sink.cc\n@@ -170,6 +170,12 @@ public:\n   std::unique_ptr<xml::node>\n   maybe_make_state_diagram (const paths::event &event);\n \n+  const logical_locations::manager *\n+  get_logical_loc_mgr () const\n+  {\n+    return m_context.get_logical_location_manager ();\n+  }\n+\n private:\n   void\n   add_stylesheet (std::string url);\n@@ -201,7 +207,6 @@ private:\n   pretty_printer *m_printer;\n   const line_maps *m_line_maps;\n   html_generation_options m_html_gen_opts;\n-  const logical_locations::manager *m_logical_loc_mgr;\n \n   std::unique_ptr<xml::document> m_document;\n   xml::element *m_head_element;\n@@ -426,7 +431,6 @@ html_builder::html_builder (context &dc,\n   m_printer (&pp),\n   m_line_maps (line_maps),\n   m_html_gen_opts (html_gen_opts),\n-  m_logical_loc_mgr (nullptr),\n   m_head_element (nullptr),\n   m_title_element (nullptr),\n   m_body_element (nullptr),\n@@ -437,9 +441,6 @@ html_builder::html_builder (context &dc,\n {\n   gcc_assert (m_line_maps);\n \n-  if (auto client_data_hooks = dc.get_client_data_hooks ())\n-    m_logical_loc_mgr = client_data_hooks->get_logical_location_manager ();\n-\n   m_document = std::make_unique<xml::document> ();\n   m_document->m_doctypedecl = std::make_unique<html_doctypedecl> ();\n   {\n@@ -636,7 +637,8 @@ html_builder::maybe_make_state_diagram (const paths::event &event)\n   if (!m_html_gen_opts.m_show_state_diagrams)\n     return nullptr;\n \n-  if (!m_logical_loc_mgr)\n+  auto logical_loc_mgr = get_logical_loc_mgr ();\n+  if (!logical_loc_mgr)\n     return nullptr;\n \n   /* Get state graph; if we're going to print it later, also request\n@@ -649,7 +651,7 @@ html_builder::maybe_make_state_diagram (const paths::event &event)\n \n   // Convert it to .dot AST\n   auto dot_graph = state_graphs::make_dot_graph (*state_graph,\n-\t\t\t\t\t\t *m_logical_loc_mgr);\n+\t\t\t\t\t\t *logical_loc_mgr);\n   gcc_assert (dot_graph);\n \n   auto wrapper = std::make_unique<xml::element> (\"div\", false);\n@@ -1083,16 +1085,16 @@ html_builder::make_element_for_diagnostic (const diagnostic_info &diagnostic,\n   gcc_assert (xp.get_num_open_tags () == depth_within_alert_div);\n \n   /* Show any logical location.  */\n-  if (m_logical_loc_mgr)\n+  if (auto logical_loc_mgr = get_logical_loc_mgr ())\n     if (auto client_data_hooks = m_context.get_client_data_hooks ())\n       if (auto logical_loc = client_data_hooks->get_current_logical_location ())\n \tif (logical_loc != m_last_logical_location)\n \t  {\n \t    enum logical_locations::kind kind\n-\t      = m_logical_loc_mgr->get_kind (logical_loc);;\n+\t      = logical_loc_mgr->get_kind (logical_loc);;\n \t    if (const char *label = get_label_for_logical_location_kind (kind))\n \t      if (const char *name_with_scope\n-\t\t  = m_logical_loc_mgr->get_name_with_scope (logical_loc))\n+\t\t  = logical_loc_mgr->get_name_with_scope (logical_loc))\n \t\tadd_labelled_value (xp, \"logical-location\",\n \t\t\t\t    label, name_with_scope, true);\n \t    m_last_logical_location = logical_loc;\n",
    "prefixes": [
        "pushed:",
        "r16-7500"
    ]
}