Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2231995/?format=api
{ "id": 2231995, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231995/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260501220913.10349-3-peter0x44@disroot.org/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.1/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 }, "msgid": "<20260501220913.10349-3-peter0x44@disroot.org>", "date": "2026-05-01T22:09:14", "name": "[2/2] libgfortran: Avoid undefined shift in caf_shmem", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "efba04a6c57f2d0023f3905b8703184bf353c173", "submitter": { "id": 88243, "url": "http://patchwork.ozlabs.org/api/1.1/people/88243/?format=api", "name": "Peter Damianov", "email": "peter0x44@disroot.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260501220913.10349-3-peter0x44@disroot.org/mbox/", "series": [ { "id": 502500, "url": "http://patchwork.ozlabs.org/api/1.1/series/502500/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502500", "date": "2026-05-01T22:09:13", "name": "[1/2] libgfortran: Use MapViewOfFileEx instead of MapViewOfFileExNuma in caf_shmem", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502500/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2231995/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2231995/checks/", "tags": {}, "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=disroot.org header.i=@disroot.org header.a=rsa-sha256\n header.s=mail header.b=T5lehSrp;\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=disroot.org header.i=@disroot.org header.a=rsa-sha256\n header.s=mail header.b=T5lehSrp", "sourceware.org;\n dmarc=pass (p=reject dis=none) header.from=disroot.org", "sourceware.org; spf=pass smtp.mailfrom=disroot.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=178.21.23.139" ], "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 4g6lbr1Pnzz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 08:10:48 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 63F2F4374238\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 1 May 2026 22:10:46 +0000 (GMT)", "from layka.disroot.org (layka.disroot.org [178.21.23.139])\n by sourceware.org (Postfix) with ESMTPS id 0A28F4A9C024;\n Fri, 1 May 2026 22:09:29 +0000 (GMT)", "from mail01.disroot.lan (localhost [127.0.0.1])\n by disroot.org (Postfix) with ESMTP id D12A626F2E;\n Sat, 2 May 2026 00:09:27 +0200 (CEST)", "from layka.disroot.org ([127.0.0.1])\n by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id b-a-ibH7tnq9; Sat, 2 May 2026 00:09:27 +0200 (CEST)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 63F2F4374238", "OpenDKIM Filter v2.11.0 sourceware.org 0A28F4A9C024" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 0A28F4A9C024", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 0A28F4A9C024", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777673369; cv=none;\n b=gJxaCjHZZM9iRkZ5ZCIIBYCn8UZ7wLLReLhko+E1tNWtkrglLgirKwNUIrWKPULYJ6eF4FR9HYqavlFQaIRZXQdbOUriSkOX8u32GmjQYhzWt53IBomB76MXtOq6UAaWRRqSu/yG8lcnWmKFlXXePD350eXr5SFO2WG5fSUEB8k=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777673369; c=relaxed/simple;\n bh=Jk5/UqRqPXkvw+KNi9Ic3lhWjY15AqvNsA9aKi0ZXEU=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=jPjgA6dFYio3hQzo6xIM5FOaynqFNPa3QYl2uqUXOZ4LhJMjF5t4kRs505hi6m/9q+qwa7KsQAdJHf+D64jHJncB0uLirMtcg2xDxG2hW7eC236o2+0srxwP7KtzeAM1fz1iFNRK4jEHDNiNlSxxWKySz6fJcxTbcHA85acN8Xw=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "X-Virus-Scanned": "SPAM Filter at disroot.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;\n t=1777673367; bh=Jk5/UqRqPXkvw+KNi9Ic3lhWjY15AqvNsA9aKi0ZXEU=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=T5lehSrpw70mv8E8f4MqUC/39iJkknkZLaTiVk7Lplab4RzWRqtDahrEJfwLgvcvt\n iuotIIDJlDaDcjrFtlnwDAEJo9z0UAOfGnK3LqwmIK/WvrR14UrIsc/RDz6nHFSqDi\n deW0pqA9alUq/R6WcmwCokpg2GwU+hnTF2vhY2Bve8o2ph7HDzYAZKYg/s6FTVMakI\n 4jVAgb4JtsI7v+RTsf1KRktg/oVWc+CIS7QXMlJaAq5xJua4eo1f+P+O5OuydVOnKn\n C/dXdwWPa6aq4UFQGMU6SC/S2LQKVvZf00hOpD7Hg9PzESKyr1ZviVta5rCCkvOr0b\n FY77rgZ9U6McA==", "From": "Peter Damianov <peter0x44@disroot.org>", "To": "gcc-patches@gcc.gnu.org", "Cc": "fortran@gcc.gnu.org, Andre Vehreschild <vehre@gcc.gnu.org>,\n Jerry DeLisle <jvdelisle@gcc.gnu.org>,\n Peter Damianov <peter0x44@disroot.org>", "Subject": "[PATCH 2/2] libgfortran: Avoid undefined shift in caf_shmem", "Date": "Fri, 1 May 2026 23:09:14 +0100", "Message-ID": "<20260501220913.10349-3-peter0x44@disroot.org>", "In-Reply-To": "<20260501220913.10349-2-peter0x44@disroot.org>", "References": "<20260501220913.10349-2-peter0x44@disroot.org>", "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": "When building gcc 16 for 32-bit Windows, I noticed this warning:\n\ngcc/libgfortran/caf/shmem/shared_memory.c: In function 'shared_memory_init':\ngcc/libgfortran/caf/shmem/shared_memory.c:173:35: warning: right shift count >= width of type [-Wshift-count-overflow]\n173 | size >> (sizeof (DWORD) * 8),\n | ^~\n\nCreateFileMapping takes the maximum mapping size split into high and low\nDWORDs. Cast size through uint64_t before computing the high DWORD so 32-bit\nWindows targets do not shift a 32-bit size_t by 32 bits.\n\nlibgfortran/ChangeLog:\n\n\t* caf/shmem/shared_memory.c: Include stdint.h.\n\t(shared_memory_init): Cast size through uint64_t before computing the high-order CreateFileMapping size DWORD.\n\nSigned-off-by: Peter Damianov <peter0x44@disroot.org>\n---\n libgfortran/caf/shmem/shared_memory.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)", "diff": "diff --git a/libgfortran/caf/shmem/shared_memory.c b/libgfortran/caf/shmem/shared_memory.c\nindex a2520a89cc7..168906b0dc0 100644\n--- a/libgfortran/caf/shmem/shared_memory.c\n+++ b/libgfortran/caf/shmem/shared_memory.c\n@@ -35,6 +35,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see\n #include <fcntl.h>\n #include <stdlib.h>\n #include <string.h>\n+#include <stdint.h>\n #ifdef HAVE_SYS_MMAN_H\n #include <sys/mman.h>\n #elif defined(WIN32)\n@@ -170,8 +171,8 @@ shared_memory_init (shared_memory_act *mem, size_t size)\n #elif defined(WIN32)\n mem->shm_fd\n \t= CreateFileMapping (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,\n-\t\t\t size >> (sizeof (DWORD) * 8),\n-\t\t\t (DWORD) (size & ~((DWORD) 0)), shm_name);\n+\t\t\t (DWORD) ((uint64_t) size >> 32),\n+\t\t\t (DWORD) size, shm_name);\n if (mem->shm_fd == NULL)\n \t{\n \t LPVOID lpMsgBuf;\n", "prefixes": [ "2/2" ] }