public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: DJ Delorie <dj@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [patch v2] aligned_alloc: conform to C17
Date: Fri, 17 Mar 2023 23:40:04 +0100	[thread overview]
Message-ID: <87a60bt323.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <xn4jqj2fm5.fsf@greed.delorie.com> (DJ Delorie's message of "Fri, 17 Mar 2023 18:10:58 -0400")

* DJ Delorie:

> Florian Weimer <fweimer@redhat.com> writes:
>> Why do we need to export the __libc_aligned_alloc symbol?  That doesn't
>> seem to be right.  We should simply change the behavior of the existing
>> aligned_alloc symbol.
>
> I did it only because memalign has a __libc_memalign symbol.  The old
> symbol used to be a weak alias for __libc_memalign, so to change it, we
> need a separate function - which would thus be __libc_aligned_alloc, so
> that aligned_alloc() can continue to be a weak function.

None of this should alter the exported symbol list, though.  It is
possible to use versioned_symbol, libc_hidden_ver, maybe with #ifdef
SHARED conditionals, to avoid the need for additional exported signal.

__libc_memalign was added when we started using it in the dynamic loader
by mistake.  That has now been fixed, and maybe we should turn it into a
compat symbol.

>> If you do not want to change behavior for existing binaries (why?),
>
> I'm going on the premise that aligned_alloc() is new to C11 and was
> always documented to fail in the way I'm making it now fail (although
> there are other "documented to fail" cases we're not implementing).
> Thus there is no need to support a pre-C11 functionality.

Sounds good to me.

Thanks,
Florian


      reply	other threads:[~2023-03-17 22:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 19:02 DJ Delorie
2023-03-17 21:10 ` Alejandro Colomar
2023-03-17 21:15   ` DJ Delorie
2023-03-17 21:18     ` Alejandro Colomar
2023-03-17 22:01 ` Florian Weimer
2023-03-17 22:10   ` DJ Delorie
2023-03-17 22:40     ` Florian Weimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a60bt323.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).