Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2023 21:51:25 +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:  <20230227205125.wT7DI%steffen@sdaoden.eu>
In-Reply-To: <CAPyFy2AipV4Uvf9G9=DsKYmWBfhTxtyGKO4uQwWFXvwWQ2J5Tw@mail.gmail.com>
References:  <202302241821.31OIL4ux075893@gitrepo.freebsd.org> <20230224205001.Fbn1A%steffen@sdaoden.eu> <CAPyFy2D3T6AtK-TYU2HZ9R8QvemC%2B_2pZ52vqANoPOtHhnyuiw@mail.gmail.com> <20230225012736.PT3cH%steffen@sdaoden.eu> <CAPyFy2A-dnbrivwZiFoJv4sYL9qyXvoZX2SK-bcd9pEdf30qQg@mail.gmail.com> <20230225222952.t3oH3%steffen@sdaoden.eu> <CAPyFy2AipV4Uvf9G9=DsKYmWBfhTxtyGKO4uQwWFXvwWQ2J5Tw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ed Maste wrote in
 <CAPyFy2AipV4Uvf9G9=DsKYmWBfhTxtyGKO4uQwWFXvwWQ2J5Tw@mail.gmail.com>:
 |On Sat, 25 Feb 2023 at 17:29, Steffen Nurpmeso <steffen@sdaoden.eu> wrote:
 |> Ed Maste wrote in
 |>  <CAPyFy2A-dnbrivwZiFoJv4sYL9qyXvoZX2SK-bcd9pEdf30qQg@mail.gmail.com>:
 |>|On Fri, 24 Feb 2023 at 20:27, Steffen Nurpmeso <steffen@sdaoden.eu> \
 |>|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)



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