Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195770/?format=api
{ "id": 2195770, "url": "http://patchwork.ozlabs.org/api/patches/2195770/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260211201815.82913-5-eggert@cs.ucla.edu/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260211201815.82913-5-eggert@cs.ucla.edu>", "list_archive_url": null, "date": "2026-02-11T20:17:37", "name": "[v2,4/4] malloc: alignment might change in future versions", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "4b44466c0b070143cf0d0940e7a90eaf0c5611b9", "submitter": { "id": 4434, "url": "http://patchwork.ozlabs.org/api/people/4434/?format=api", "name": "Paul Eggert", "email": "eggert@CS.UCLA.EDU" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260211201815.82913-5-eggert@cs.ucla.edu/mbox/", "series": [ { "id": 491904, "url": "http://patchwork.ozlabs.org/api/series/491904/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=491904", "date": "2026-02-11T20:17:33", "name": "malloc doc fixes for alignment", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/491904/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2195770/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195770/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "libc-alpha@sourceware.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "libc-alpha@sourceware.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256\n header.s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C header.b=g71m7Vrv;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256\n header.s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C header.b=g71m7Vrv", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=cs.ucla.edu", "sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu", "server2.sourceware.org;\n arc=none smtp.remote-ip=131.179.128.66", "mail.cs.ucla.edu (amavis); dkim=pass (2048-bit key)\n header.d=cs.ucla.edu" ], "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 4fB8ss61qzz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 07:19:29 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id DD6414BA23F9\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 20:19:27 +0000 (GMT)", "from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66])\n by sourceware.org (Postfix) with ESMTPS id D3F754BA23E1\n for <libc-alpha@sourceware.org>; Wed, 11 Feb 2026 20:18:36 +0000 (GMT)", "from localhost (localhost [127.0.0.1])\n by mail.cs.ucla.edu (Postfix) with ESMTP id 36BB23C014086;\n Wed, 11 Feb 2026 12:18:36 -0800 (PST)", "from mail.cs.ucla.edu ([127.0.0.1])\n by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP\n id GimTaUaK5GIJ; Wed, 11 Feb 2026 12:18:36 -0800 (PST)", "from localhost (localhost [127.0.0.1])\n by mail.cs.ucla.edu (Postfix) with ESMTP id 0E4043C0149E3;\n Wed, 11 Feb 2026 12:18:36 -0800 (PST)", "from mail.cs.ucla.edu ([127.0.0.1])\n by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP\n id vcx15ZhO4tls; Wed, 11 Feb 2026 12:18:35 -0800 (PST)", "from wing.home (47-154-25-30.fdr01.snmn.ca.ip.frontiernet.net\n [47.154.25.30])\n by mail.cs.ucla.edu (Postfix) with ESMTPSA id E69B33C014086;\n Wed, 11 Feb 2026 12:18:35 -0800 (PST)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org DD6414BA23F9", "OpenDKIM Filter v2.11.0 sourceware.org D3F754BA23E1", "OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 0E4043C0149E3" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D3F754BA23E1", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D3F754BA23E1", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770841116; cv=none;\n b=h2om+wLYXr7WxVy1OHfy9leLeeI/GOYZ1wXoBRTfwjiIh/ovJVhpkx8fd/cVsygSGdjmekZvDfAMTp0Z51zkbRu6w6vC60Nk8dLlspLnS2lfzQZetFEBMaUI6nE12KkQOdE4Y6NrsNxqx7oJv9N77zAd79ePkl10ZTdiFfa8PJc=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770841116; c=relaxed/simple;\n bh=E7MR8z3dJLIKpsPsKbyZQ2uDtL+1xbePjcZr04eFzTw=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=JJi6D+UmQ5HSCFpf73uKgDOIGWHbvQI4V7m5RDMlMcL0s6mlH/iHAJGCAozUmHXFwWuijV+nP13m8oDP+8I/rK1woNeBtsUOVuIYENUT4zW9SiDD98zf2WnVwx3CLGBa5eLBiqL3ITRWsnbEHzFAeaD2bsq6zriqdpNZWYSwSMg=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;\n s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1770841116;\n bh=XWb9MUR3ardfBHi+iPKfNzRTRQCvWTK5u0bSdhmp8u4=;\n h=From:To:Date:Message-ID:MIME-Version;\n b=g71m7Vrvuc1E+eKGC+gfrfSZzybw3YokoZRJILRfqvPXVHha7cDESteIEK3boc37e\n 6yzuUnX6oJeaXzHuxXk+g8VloHTRTBvRShJckW2hCpw4ERQfgYM1cbxkm+RONOmZxP\n rvxbcH2Umw1CEBxWj9vnd5jaPG+jTZFrFEhT4BclzguSfC2+a9lmei75dCHkOxoBFs\n kHTNQ99H23y2aEz6hMXb3yB+dwEPtz44eJkBD6RYFLg1qLSN3nzwvJ/UoCpf98PeKS\n k9LzKSeo5s/hQpxJ2EuwJ2Mq1KbdqXo8+63MzMuMG/P+TD/Q0XPxsiL+/RtPeSNRC6\n obvL60mdpG0dg==", "X-Virus-Scanned": "amavis at mail.cs.ucla.edu", "From": "Paul Eggert <eggert@cs.ucla.edu>", "To": "libc-alpha@sourceware.org", "Cc": "Paul Eggert <eggert@cs.ucla.edu>", "Subject": "[PATCH v2 4/4] malloc: alignment might change in future versions", "Date": "Wed, 11 Feb 2026 12:17:37 -0800", "Message-ID": "<20260211201815.82913-5-eggert@cs.ucla.edu>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260211201815.82913-1-eggert@cs.ucla.edu>", "References": "<20260211201815.82913-1-eggert@cs.ucla.edu>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "quoted-printable", "X-BeenThere": "libc-alpha@sourceware.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>", "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>", "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>", "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>", "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org" }, "content": "This follows up on a comment by Wilco Dijkstra; see:\nhttps://sourceware.org/pipermail/libc-alpha/2026-February/174934.html\n* NEWS: Mention this.\n* manual/lang.texi (Important Data Types):\nSay that alignof (max_align_t) might change.\n* manual/memory.texi (Malloc Examples):\nSay that alignment guarantee might change for small allocations.\n---\n NEWS | 7 ++++++-\n manual/lang.texi | 2 +-\n manual/memory.texi | 8 ++++++--\n 3 files changed, 13 insertions(+), 4 deletions(-)", "diff": "diff --git a/NEWS b/NEWS\nindex c63d9d6470..46590a996c 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -13,7 +13,12 @@ Major new features:\n \n Deprecated and removed features, and other changes affecting compatibility:\n \n- [Add deprecations, removals and changes affecting compatibility here]\n+* Although malloc and related functions currently return pointers\n+ aligned to alignof (max_align_t), the documentation now says future\n+ versions of glibc may relax alignment requirements for small allocations.\n+ For example, a future malloc (1) might return a pointer with odd\n+ alignment, because no object of size 1 can have a fundamental\n+ alignment greater than 1.\n \n Changes to build and runtime requirements:\n \ndiff --git a/manual/lang.texi b/manual/lang.texi\nindex bffe1390e4..a48dc30cff 100644\n--- a/manual/lang.texi\n+++ b/manual/lang.texi\n@@ -597,7 +597,7 @@ types have a fundamental alignment and lack stricter alignment specifiers.\n In @theglibc{}, the value of @code{alignof (max_align_t)} is 16 on\n most architectures. However, it is 8 on 32-bit architectures that do\n not require 16-byte alignment from @code{malloc} to support predefined\n-types.\n+types. The value may change in future releases.\n \n @strong{Compatibility Note:} The C11 standard introduced @code{max_align_t};\n older compilers may lack the type.\ndiff --git a/manual/memory.texi b/manual/memory.texi\nindex 55cb92a0bd..a32aec382c 100644\n--- a/manual/memory.texi\n+++ b/manual/memory.texi\n@@ -653,13 +653,17 @@ savestring (const char *ptr, size_t len)\n @end group\n @end smallexample\n \n-In @theglibc{}, the block that @code{malloc} gives you is guaranteed\n-to be aligned so that its address is a multiple of\n+In the current release of @theglibc{}, the block that @code{malloc} gives you is\n+aligned so that its address is a multiple of\n @code{alignof (max_align_t)}, so that it can hold object types\n with any fundamental alignment and without stricter alignment specifiers.\n Only rarely is any higher boundary (such as a page\n boundary) necessary; for those cases, use @code{aligned_alloc} or\n @code{posix_memalign} (@pxref{Aligned Memory Blocks}).\n+Future releases of @theglibc{} may relax alignment for small allocations,\n+so long as any object with fundamental alignment that fits in the small\n+allocation will be properly aligned. For example, a future @code{malloc (1)}\n+might return a pointer with odd alignment.\n \n Note that the memory located after the end of the block is likely to be\n in use for something else; perhaps a block already allocated by another\n", "prefixes": [ "v2", "4/4" ] }