public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Carlos O'Donell" <carlos@redhat.com>
Cc: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] nptl: Export _pthread_cleanup_push, _pthread_cleanup_pop again
Date: Tue, 15 Jun 2021 21:46:44 +0200	[thread overview]
Message-ID: <20210615194644.GS7746@tucnak> (raw)
In-Reply-To: <f9acdd21-a165-4779-e389-38ffe331011d@redhat.com>

On Tue, Jun 15, 2021 at 03:35:56PM -0400, Carlos O'Donell wrote:
> >>> These were turned into compat symbols as part of the libpthread
> >>> move.  It turns out they are used by language run-time libraries
> >>> (e.g., the GCC D front end), so it makes to preserve them as
> >>> external symbols even though they are not declared in any header
> >>> file.
> >>>
> >>> Tested on i686-linux-gnu, x86_64-linux-gnu.  Built on i686-gnu.  (No
> >>> full build on all ABIs, but the ABI update was done with
> >>> update-all-abi.)
> >>
> >> Just like the pthread min stack size problem this is something we can't
> >> change until we work with the runtime authors to avoid the regression or
> >> get interfaces they need defined.
> >>
> >> Thanks for working through this issue. This change is straight forward,
> >> we aren't at ABI freeze yet, and so this looks good to me.
> > 
> > Just to be clear, this is a public interface, not a GLIBC_PRIVATE one.
> > It's just an old interface that unexpectedly has current users.
> 
> As an interface with a leading underscore it is part of the implementation
> and should only have been called by macros under the control of the
> implementation. There is perhaps a digression here, is the "D" runtime in
> gcc a part of the implementation formed with glibc? If your answer is "Yes"
> then the libphobos implementation that calls _pthreaed_cleanup_[push,pop]
> is valid code to have in the compiler. However, my opinion is that core
> language runtimes should not be calling leading underscore functions, and
> that there should be a stronger separation between the language runtime
> and the core runtime functionality. That requires we talk to more language
> runtime developers to ensure we provide the functionality they need and
> that we provide that functionality in some way. They should definitely
> not be calling GLIBC_PRIVATE functions, but they do, because of missing
> functionality in public interfaces.

Languages like D can't use the C headers glibc provides.
And, this isn't something to gcc, it has been in all the D implementations
for ~ 13 years already:
https://github.com/dlang/druntime/blame/master/src/core/sys/posix/pthread.d

	Jakub


      reply	other threads:[~2021-06-15 19:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 15:21 Florian Weimer
2021-06-15 19:17 ` Carlos O'Donell
2021-06-15 19:19   ` Florian Weimer
2021-06-15 19:35     ` Carlos O'Donell
2021-06-15 19:46       ` Jakub Jelinek [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=20210615194644.GS7746@tucnak \
    --to=jakub@redhat.com \
    --cc=carlos@redhat.com \
    --cc=fweimer@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).