Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194976/?format=api
{ "id": 2194976, "url": "http://patchwork.ozlabs.org/api/patches/2194976/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260210103153.2954-1-gerris.rs@gmail.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": "<20260210103153.2954-1-gerris.rs@gmail.com>", "list_archive_url": null, "date": "2026-02-10T10:31:52", "name": "[gccrs,COMMIT] parser: Fix rogue null pointer in null_denotation_path", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "bca89fc368bc4da2556b7532e904dc9dcbaa361f", "submitter": { "id": 92092, "url": "http://patchwork.ozlabs.org/api/people/92092/?format=api", "name": null, "email": "gerris.rs@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260210103153.2954-1-gerris.rs@gmail.com/mbox/", "series": [ { "id": 491646, "url": "http://patchwork.ozlabs.org/api/series/491646/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491646", "date": "2026-02-10T10:31:52", "name": "[gccrs,COMMIT] parser: Fix rogue null pointer in null_denotation_path", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491646/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194976/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194976/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 unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=f25xu/Xz;\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 unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=f25xu/Xz", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "sourceware.org; spf=pass smtp.mailfrom=gmail.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.222.173" ], "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 4f9Htz2NPzz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 21:32:27 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 2EBB44BB589B\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 10:32:25 +0000 (GMT)", "from mail-qk1-f173.google.com (mail-qk1-f173.google.com\n [209.85.222.173])\n by sourceware.org (Postfix) with ESMTPS id D901D4B9DB54\n for <gcc-patches@gcc.gnu.org>; Tue, 10 Feb 2026 10:31:56 +0000 (GMT)", "by mail-qk1-f173.google.com with SMTP id\n af79cd13be357-8c7146b0854so569058585a.2\n for <gcc-patches@gcc.gnu.org>; Tue, 10 Feb 2026 02:31:56 -0800 (PST)", "from\n runnervmwffz4.phsjm35sxllu3kbyy1grtpjsrd.ex.internal.cloudapp.net\n ([64.236.161.37]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8caf9fdf739sm997342085a.41.2026.02.10.02.31.54\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 10 Feb 2026 02:31:55 -0800 (PST)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 2EBB44BB589B", "OpenDKIM Filter v2.11.0 sourceware.org D901D4B9DB54" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D901D4B9DB54", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D901D4B9DB54", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770719516; cv=none;\n b=RUFP+Tb2QRXqWw5y0K2lOncSXVuPFxJF4YC5FLlxzNb8Jn0mFUCESIXTyND2jDIc30HAJgnlkkbZbBEzKcoqLDvQShxEDyk8s/L6Tcd/CpSgTwsMJsjcGsOZNgN5C8V3mpt8R3sxBSoag0EwciBH3gt1mRIrH3s4ltlFlegVGQ0=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770719516; c=relaxed/simple;\n bh=rNmbtoVNY26jfxz6rA1dqeiMFlCb0SVp6AnuaoO1JOE=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=jHDFa7dTZq1eXF3mj06NryP1/BD47funxDQlWxMO0z+pPFv2g/BiUhVrrJSjJdWKrtilMM7LhYbVpwTGEq78urJN9ztIXRyGhbX8eRgJUY8jshylundBV8zfPZ8n3W5QGTwTEcRbEZ+8lfkXo+vylFVYsQRgrlzj2fQJLbQePWM=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770719516; x=1771324316; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=Kzb5HhdGIA6n9mUHcG2A8W6J+fBZm4dqPzOOfdn98bM=;\n b=f25xu/XzLDb8WEty1kMlHUrsLfGdT/VmY+hjycPsUCIza+fQniKuQunYcAAVqCOkAH\n 0NAcY6v7PcUM/31BuZqWyTqFWwe6SV9QpThEPlNmihjKioQeNyf9c8raHHAHfM2OR3V8\n Ayd+hQeWZWWPB7QuMLepRecHYeMJFCkn2kpEAbpzOLlTKDB4bO8l+FrQibGUXi3hFem2\n i/BgjfVP2fbWhjEEFHdQyXTXwVs/Y2LYJKIP2mmsE1RnVi8+OKDZeRpBAMKdR4XaeFuD\n TM2Shl0rsynj9V3YX33J9mRfJU30qcduv8ek9fVQE+IsKGGHHagz0tFfb+PiGJ0n6XkY\n a2bw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770719516; x=1771324316;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=Kzb5HhdGIA6n9mUHcG2A8W6J+fBZm4dqPzOOfdn98bM=;\n b=H07r/m67O+n+DOmukJQ49OQUk6EhtjJhlQVNqxgiPU747l+3G5dDNOv3iPK9j+10y+\n Hl/fChp1yc5ST5zOABUb3OKjhLPH/QN84aaWklf3h+Wp0X73aAZJomT7QJHagcNPUZsV\n GGV028umra4iUKMwBK1RN+43N0m2JrKfNOXcbiurWBwoLGtVNXAfESW6Cw2y2ApTt9RQ\n C+d39rO7F4wqhHef1AiKEwjgnwbPYJlaCAOOQgPF7/1y1mbu0NierU4U2n1w2jeVl0Mz\n ZFnoQqKuM7yKpdm4/djJklUlMcxxTsaLhX4ATaAu1lmJ+jt8kNexsTf/7YS7LYs+cMiA\n NH8w==", "X-Gm-Message-State": "AOJu0YyHEuR/as8t/IPMg2bpktETPDSmrdGcGhftfGBKRvSJLcup6F1s\n pjl3uUVD7C0+SegUp0loU6nhpUnfqSfHqHJ2ADlgynjoInw3I+5A4oekyHiPzTfN", "X-Gm-Gg": "AZuq6aKGj+zNVxt8LVimQOE6hUMVJigOxLyMSISP3kJxXGWISHi4N3UONwPtRQTcO58\n fIMEn9EMiDGwHxMBBVLQJ4k5n5R4WMVjAJdVtq0UTuVfk2WHIIjVyxirnNqZdj7UpxO9Tddhu9d\n oXZC/wmGeASr01k+rczU4EQbXcAsm0X/jsspBvkfJMWHGNJIeTj1n4FqMnkxnUvrVIvG9VKmlR0\n KXZZwb4XriI9pmP8xEJCs7xpvAWGd1SF/KfFrn30v2jtKuwQsHW8+xOf92xY2VQZIge3z72vQjT\n jucygwpxG8aPtMb7cJo1c44ck5IJYYwCH363bwxn+mUuRn2PNHu8K5rgWaGjsSqEjgdbzCQi146\n jNVrMrekrsYdi88o5SXY+9AKOKbAPhSuaNrOlx/atVjkv2h2/70jYCbT3mx6ti9uwqFuAZmruIH\n 6uJ2289rpxclUDFWrRzLDJTLcBHCrNy6/LkSWT/8Z37GYv0O0HYVjmCE58gF4Kys59cWIcdA4p0\n DNAEu3aBCb6Lf/bD0Mj", "X-Received": "by 2002:a05:620a:bd6:b0:85b:cd94:71fe with SMTP id\n af79cd13be357-8cb1f6d9f21mr161130185a.33.1770719516195;\n Tue, 10 Feb 2026 02:31:56 -0800 (PST)", "From": "gerris.rs@gmail.com", "To": "gcc-patches@gcc.gnu.org,\n\tgcc-rust@gcc.gnu.org", "Cc": "pierre-emmanuel.patry@embecosm.com, arthur.cohen@embecosm.com,\n dkm+gccrs@kataplop.net, Harishankar <harishankarpp7@gmail.com>", "Subject": "[gccrs COMMIT] parser: Fix rogue null pointer in null_denotation_path", "Date": "Tue, 10 Feb 2026 10:31:52 +0000", "Message-ID": "<20260210103153.2954-1-gerris.rs@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "From: Harishankar <harishankarpp7@gmail.com>\n\nThe compiler previously crashed with a segmentation fault when parsing\na struct or tuple expression that failed to parse correctly (e.g.,\nreturning nullptr). This occurred because the parser implicitly wrapped\nthe null pointer result in a successful tl::expected, causing a crash\nlater when the compiler attempted to use the invalid pointer. This\npatch adds checks in null_denotation_path to ensure that failed struct\nand tuple parsing results are returned as errors (tl::unexpected)\ninstead of null pointers.\n\nFixes Rust-GCC/gccrs#4426\n\ngcc/rust/ChangeLog:\n\n\t* parse/rust-parse-impl-expr.hxx (null_denotation_path):\n\tCheck for null struct and tuple expressions to prevent segmentation fault.\n\nSigned-off-by: Harishankar <harishankarpp7@gmail.com>\n---\nThis change was merged into the gccrs repository and is posted here for\nupstream visibility and potential drive-by review, as requested by GCC\nrelease managers.\nEach commit email contains a link to its details on github from where you can\nfind the Pull-Request and associated discussions.\n\n\nCommit on github: https://github.com/Rust-GCC/gccrs/commit/c4bc3153bffc32eced40a54a83fe8863729456c8\n\nThe commit has been mentioned in the following pull-request(s):\n - https://github.com/Rust-GCC/gccrs/pull/4427\n\n gcc/rust/parse/rust-parse-impl-expr.hxx | 40 +++++++++++++++++--------\n 1 file changed, 28 insertions(+), 12 deletions(-)\n\n\nbase-commit: 9ed1331dee4b5a7cd43d61d869ef4f16b3011f51", "diff": "diff --git a/gcc/rust/parse/rust-parse-impl-expr.hxx b/gcc/rust/parse/rust-parse-impl-expr.hxx\nindex 713bcc8d0..306a0958d 100644\n--- a/gcc/rust/parse/rust-parse-impl-expr.hxx\n+++ b/gcc/rust/parse/rust-parse-impl-expr.hxx\n@@ -2001,20 +2001,36 @@ Parser<ManagedTokenSource>::null_denotation_path (\n \t return std::unique_ptr<AST::PathInExpression> (\n \t new AST::PathInExpression (std::move (path)));\n \t }\n-\treturn parse_struct_expr_struct_partial (std::move (path),\n-\t\t\t\t\t\t std::move (outer_attrs));\n+\tauto struct_expr\n+\t = parse_struct_expr_struct_partial (std::move (path),\n+\t\t\t\t\t std::move (outer_attrs));\n+\tif (struct_expr == nullptr)\n+\t {\n+\t return tl::unexpected<Parse::Error::Expr> (\n+\t Parse::Error::Expr::CHILD_ERROR);\n+\t }\n+\treturn struct_expr;\n }\n case LEFT_PAREN:\n- // struct/enum expr tuple\n- if (!restrictions.can_be_struct_expr)\n-\t{\n-\t // assume path is returned\n-\t // HACK: add outer attributes to path\n-\t path.set_outer_attrs (std::move (outer_attrs));\n-\t return std::make_unique<AST::PathInExpression> (std::move (path));\n-\t}\n- return parse_struct_expr_tuple_partial (std::move (path),\n-\t\t\t\t\t std::move (outer_attrs));\n+ {\n+\t// struct/enum expr tuple\n+\tif (!restrictions.can_be_struct_expr)\n+\t {\n+\t // assume path is returned\n+\t // HACK: add outer attributes to path\n+\t path.set_outer_attrs (std::move (outer_attrs));\n+\t return std::make_unique<AST::PathInExpression> (std::move (path));\n+\t }\n+\tauto tuple_expr\n+\t = parse_struct_expr_tuple_partial (std::move (path),\n+\t\t\t\t\t std::move (outer_attrs));\n+\tif (tuple_expr == nullptr)\n+\t {\n+\t return tl::unexpected<Parse::Error::Expr> (\n+\t Parse::Error::Expr::CHILD_ERROR);\n+\t }\n+\treturn tuple_expr;\n+ }\n default:\n // assume path is returned if not single segment\n if (path.is_single_segment ())\n", "prefixes": [ "gccrs", "COMMIT" ] }