From nobody Sat Feb 25 01:27:36 2023 X-Original-To: dev-commits-src-main@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 4PNpzH2kSQz3vBGH; Sat, 25 Feb 2023 01:27:39 +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 4PNpzH0LS9z3F1G; Sat, 25 Feb 2023 01:27:39 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Sat, 25 Feb 2023 02:27:36 +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: <20230225012736.PT3cH%steffen@sdaoden.eu> In-Reply-To: References: <202302241821.31OIL4ux075893@gitrepo.freebsd.org> <20230224205001.Fbn1A%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-418-gbf8954aec4 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: 4PNpzH0LS9z3F1G 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Ed Maste wrote in : |On Fri, 24 Feb 2023 at 18:26, Steffen Nurpmeso wrote: ... |> Just out of interest. Why not 1? |> Or "if(align==0)align=1;"? | |Yes that's what I would have done, but it's fine either way and I just |took the submission. | |> (Which is what i always did, as> "allocating nothing" is merely \ |> a debug concern, which, for better |> memory pools like OpenBSD (i would presume), or during ASAN, |> causes better (even upon read).) | |I don't really understand what you mean here, or how "allocating |nothing" is related. Me too. 'Was just thinking of allocators which give back valid but inaccessible memory for 0 bytes so that each access would fault. (As opposed to give back minimum allocation. Or give back minimum allocation but in debug mode "put canaries" so that write accesses "are detected", but read ones not. That mediocre stuff that i was and am doing thus. Whatever.) Thanks, and a nice weekend. --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)