mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [musl] [PATCH] [RFC] cleanup/refactor pthread_arch.h, pthread_impl.h
Date: Thu, 27 Aug 2020 18:38:58 -0400	[thread overview]
Message-ID: <20200827223858.GS3265@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAGxPR-9y8-dkjzOJf-6OFP65jwH30L1TAa-OxNO1uUcbHGp-FQ@mail.gmail.com>

On Wed, Aug 26, 2020 at 11:52:46PM +0200, Bartosz Brachaczek wrote:
> On Tue, Aug 25, 2020 at 6:43 PM Rich Felker <dalias@libc.org> wrote:
> 
> > The attached patch series refactors fragments from pthread_arch.h to
> > reduce redundancy and allow pthread_arch.h to be included at the top
> > of pthread_impl.h, where it can be used to influence the
> > definition/layout of struct __pthread, rather than the middle of the
> > file. This makes it possible to get rid of the duplicate canary and
> > dtv members that existed just to match multiple ABIs silumtaneously.
> >
> > This involved a good deal of manual conversion/deduplication so it's
> > possible there are bugs for some archs. That's why I've posted the
> > series for review rather than just pushing. Reports of success/failure
> > (disassembly of pthread_self.o before/after probably suffice to
> > confirm no regression) would be very helpful.
> >
> 
> I mechanically confirmed for all archs that with the first two patches
> applied, disassembly of pthread_self.o before/after doesn't change. The
> third patch obviously changes the offset for most archs due to change in
> sizeof struct pthread.
> 
> Only other remark: ricv64's __get_tp misses the change of the variable type
> from char * to uintptr_t.

Thanks -- that's very helpful. It also raises a point that we should
probably add -Werror=int-conversion to the default CFLAGS. As far as I
can tell it only catches invalid (constraint-violation) implicit
conversions like the one you found, and does not have any
style-policing component to it.

Rich

      reply	other threads:[~2020-08-27 22:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 16:43 Rich Felker
2020-08-26 21:52 ` Bartosz Brachaczek
2020-08-27 22:38   ` Rich Felker [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=20200827223858.GS3265@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).