get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196024,
    "url": "http://patchwork.ozlabs.org/api/patches/2196024/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260212182031.107003-3-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": "<20260212182031.107003-3-eggert@cs.ucla.edu>",
    "list_archive_url": null,
    "date": "2026-02-12T18:18:12",
    "name": "[v3,2/4] Document malloc alignment",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b2756201cf404be7a3b1161d5478ef262fab7bd0",
    "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/20260212182031.107003-3-eggert@cs.ucla.edu/mbox/",
    "series": [
        {
            "id": 492003,
            "url": "http://patchwork.ozlabs.org/api/series/492003/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=492003",
            "date": "2026-02-12T18:18:14",
            "name": "malloc doc fixes for alignment",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/492003/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196024/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196024/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=Z4NlFmg8;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.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=Z4NlFmg8",
            "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 [38.145.34.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 4fBkHF68msz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 05:24:57 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id EBB384BA23C6\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 18:24:55 +0000 (GMT)",
            "from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66])\n by sourceware.org (Postfix) with ESMTPS id F40DA4BA2E1C\n for <libc-alpha@sourceware.org>; Thu, 12 Feb 2026 18:20:58 +0000 (GMT)",
            "from localhost (localhost [127.0.0.1])\n by mail.cs.ucla.edu (Postfix) with ESMTP id 3EE573C03E9EB;\n Thu, 12 Feb 2026 10:20:58 -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 pTiqAnCIoNAB; Thu, 12 Feb 2026 10:20:58 -0800 (PST)",
            "from localhost (localhost [127.0.0.1])\n by mail.cs.ucla.edu (Postfix) with ESMTP id 17F843C03E9F0;\n Thu, 12 Feb 2026 10:20:58 -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 9OQodRFnCbxZ; Thu, 12 Feb 2026 10:20:58 -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 F41FB3C03E9EB;\n Thu, 12 Feb 2026 10:20:57 -0800 (PST)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org EBB384BA23C6",
            "OpenDKIM Filter v2.11.0 sourceware.org F40DA4BA2E1C",
            "OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 17F843C03E9F0"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org F40DA4BA2E1C",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org F40DA4BA2E1C",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770920459; cv=none;\n b=pwmE5nPGSFTisuBE3SVY0XpdSmu/EzWzzQloC35DADKB1D7syVO5lLPGuoqPVxMcvPH+Of0LZ4OvwPWi1dSh/SixyZD4Y7ZKTAJzs0RrbcHEQTOW/Q3SxLWW7Tj9VVgAKYcHShsOehv77wnU9Cat41i2lW15kqt5F+Jf77530Ik=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770920459; c=relaxed/simple;\n bh=HOAZjqYGjc4DRLDFqK1REEA5D9V98EK9YhhvQeUZSTY=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=jccrk9ok0k2/xYWeIVd0YC25gmYzd6UKEkCoXiMaziz4fuTEV11HBEIhqaebrvkcHn15N0lVrPSaDWnO2FqyKy5O271Wj/EP6VoOVDEsMNzLMkiUak3K5zOALLM7cJ3Q6GU/5qmxzu7gbO+Q0Pu59IcW1bUJla1MRCNbcTbyW6I=",
        "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=1770920458;\n bh=3Aw/KXpg8KdmSkHFteAAHpx3/VNCZTlnBZv7B4vQ0Uw=;\n h=From:To:Date:Message-ID:MIME-Version;\n b=Z4NlFmg87lmeAmRMfWTwosNqWDE5vwsgD1aVkQa3o0pxF2j9mCGzENGpvDEtosYy+\n mAn/+jFahdlQJ1qOZraU2fFabr1Ko9o6dXYaP6QYtBzCeGdtSOeBg67joZfzQLD+EZ\n 8C+PMuepQMEJADUt+CsfrCw8eTNOe6gaMcsbdozjLP1y2anogWyzjJHc40fBITNERw\n dOrCKAoDirOkOfIZ+pUdNDcqXTnRuliDNEh6dmdk0z4R7H/LbuLS3hMisZBGDs/r45\n pm4jSkn+w5w+PIFa6/Ey/v05E7jte823S0GgW/i+ivgxoe9eMO9f1YD2kh+rnN1qdI\n TomPGvPGxQOmQ==",
        "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 v3 2/4] Document malloc alignment",
        "Date": "Thu, 12 Feb 2026 10:18:12 -0800",
        "Message-ID": "<20260212182031.107003-3-eggert@cs.ucla.edu>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20260212182031.107003-1-eggert@cs.ucla.edu>",
        "References": "<20260212182031.107003-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": "* manual/memory.texi (Malloc Examples, Changing Block Size)\n(Allocating Cleared Space):\nDocument the alignment of the returned value.\n---\n manual/memory.texi | 31 +++++++++++++++++++++++++++----\n 1 file changed, 27 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/manual/memory.texi b/manual/memory.texi\nindex f85e8ef26d..614cdc4e46 100644\n--- a/manual/memory.texi\n+++ b/manual/memory.texi\n@@ -652,10 +652,11 @@ savestring (const char *ptr, size_t len)\n @end group\n @end smallexample\n \n-The block that @code{malloc} gives you is guaranteed to be aligned so\n-that it can hold any type of data.  On @gnusystems{}, the address is\n-always a multiple of eight on 32-bit systems, and a multiple of 16 on\n-64-bit systems.  Only rarely is any higher boundary (such as a page\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+@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 \n@@ -677,6 +678,18 @@ returns a non-null pointer to a newly allocated size-zero block;\n other implementations may return @code{NULL} instead.\n POSIX and the ISO C standard allow both behaviors.\n \n+@item\n+In @theglibc{}, a non-null pointer returned by @code{malloc (@var{size})}\n+is a multiple of @code{alignof (max_align_t)} when converted to an integer.\n+Other implementations may align the result only to what is needed for\n+fundamentally-aligned objects of size at most @code{max (@var{size}, 1)}.\n+For example, if @code{alignof (max_align_t)} is 16 but smaller\n+fundamentally-aligned objects all have alignment of at most 4,\n+other implementations of @code{malloc (15)} might return\n+a pointer that is a multiple of 4 but not of 16 or even of 8.\n+Portable code should therefore use a function like @code{aligned_alloc}\n+if it needs @code{alignof (max_align_t)} alignment even for small allocations.\n+\n @item\n In @theglibc{}, a failed @code{malloc} call sets @code{errno},\n but ISO C does not require this and non-POSIX implementations\n@@ -866,6 +879,10 @@ Otherwise, if @var{newsize} is zero\n Otherwise, if @code{realloc} cannot reallocate the requested size\n it returns @code{NULL} and sets @code{errno}; the original block\n is left undisturbed.\n+\n+Any non-null pointer returned by @code{realloc} satisfies the same\n+alignment restrictions as a similar pointer returned by @code{malloc}\n+with the same size.\n @end deftypefun\n \n @deftypefun {void *} reallocarray (void *@var{ptr}, size_t @var{nmemb}, size_t @var{size})\n@@ -980,6 +997,12 @@ is declared in @file{stdlib.h}.\n This function allocates a block long enough to contain a vector of\n @var{count} elements, each of size @var{eltsize}.  Its contents are\n cleared to zero before @code{calloc} returns.\n+\n+In @theglibc{}, the vector is aligned the same way that @code{malloc}\n+aligns its returned values.  In other implementations, it is merely\n+aligned suitably for any array of fundamentally-aligned elements each\n+with size at most @code{max (@var{size}, 1)}.\n+\n @end deftypefun\n \n You could define @code{calloc} as follows:\n",
    "prefixes": [
        "v3",
        "2/4"
    ]
}