From nobody Mon Feb 27 20:51:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PQXjL68Hjz3t7SF; Mon, 27 Feb 2023 20:51:34 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PQXjL2QYTz4Q19; Mon, 27 Feb 2023 20:51:34 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Mon, 27 Feb 2023 21:51:25 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2c709ee70ade - main - libc: handle zero alignment in memalign() Message-ID: <20230227205125.wT7DI%steffen@sdaoden.eu> In-Reply-To: References: <202302241821.31OIL4ux075893@gitrepo.freebsd.org> <20230224205001.Fbn1A%steffen@sdaoden.eu> <20230225012736.PT3cH%steffen@sdaoden.eu> <20230225222952.t3oH3%steffen@sdaoden.eu> Mail-Followup-To: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org User-Agent: s-nail v14.9.24-430-g6a13fd0a75 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4PQXjL2QYTz4Q19 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Ed Maste wrote in : |On Sat, 25 Feb 2023 at 17:29, Steffen Nurpmeso wrote: |> Ed Maste wrote in |> : |>|On Fri, 24 Feb 2023 at 20:27, Steffen Nurpmeso \ |>|wrote: |>|> Me too. 'Was just thinking of allocators which give back valid |>|> but inaccessible memory for 0 bytes so that each access would |>|> fault. |>| |>|The size is not (necessarily) zero though. The alignment requested is. |> |> I personally would fail EINVAL for 0: something really must be |> bogus if you reqest an alignment of 0. The standard says |> |> Upon successful completion, posix_memalign( ) shall return zero; | |This is not posix_memalign, this is memalign which is provided for |glibc compatibility (and which accepts align == 0). This came up only |because Valgrind's tests triggered this case. This is what happens when one mutilates the email quote context. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)