Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2023 02:27:36 +0100
From:      Steffen Nurpmeso <steffen@sdaoden.eu>
To:        Ed Maste <emaste@freebsd.org>
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: <CAPyFy2D3T6AtK-TYU2HZ9R8QvemC%2B_2pZ52vqANoPOtHhnyuiw@mail.gmail.com>
References:  <202302241821.31OIL4ux075893@gitrepo.freebsd.org> <20230224205001.Fbn1A%steffen@sdaoden.eu> <CAPyFy2D3T6AtK-TYU2HZ9R8QvemC%2B_2pZ52vqANoPOtHhnyuiw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ed Maste wrote in
 <CAPyFy2D3T6AtK-TYU2HZ9R8QvemC+_2pZ52vqANoPOtHhnyuiw@mail.gmail.com>:
 |On Fri, 24 Feb 2023 at 18:26, Steffen Nurpmeso <steffen@sdaoden.eu> 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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230225012736.PT3cH%steffen>