From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Issues when building libcxx libcxxabi with MUSL
Date: Thu, 30 Jun 2016 10:58:09 -0400 [thread overview]
Message-ID: <20160630145809.GC15995@brightrain.aerifal.cx> (raw)
In-Reply-To: <3BEDF5FF-692E-427D-A02C-3950902B9CC7@gmail.com>
On Thu, Jun 30, 2016 at 04:36:09PM +0200, Julien Ramseier wrote:
>
> > Le 30 juin 2016 à 15:38, Rich Felker <dalias@libc.org> a écrit :
> >
> > Could you cite the specific text you're looking at? The requirement of
> > static storage was removed by
> > http://austingroupbugs.net/view.php?id=70 <http://austingroupbugs.net/view.php?id=70> but I see nothing allowing
> > the use of mutex values or assigning one to another, which as I
> > understand it is what the offending libc++ code is doing.
>
> I'm not sure what you mean by "mutex value".
What I mean is any use of an expression of type pthread_mutex_t except
an lvalue whose address is taken to pass to one of the pthread_mutex_*
functions -- and especially, assignment expressions assigning a value
of type pthread_mutex_t to an object of type pthread_mutex_t.
> The libcxx mutex class only uses the PTHREAD_MUTEX_INITIALIZER
> macro as an initializer for its underlying pthread_mutex member.
I don't know modern C++ well enough to evaluate whether that's
accurate. But in the old code this looks like use of a mutex value:
constexpr mutex() _NOEXCEPT : __m_(_LIBCPP_MUTEX_INITIALIZER) {}
Maybe I'm misreading it.
> The part of the spec I was referring to is the use of
> PTHREAD_MUTEX_INITIALIZER to initialize non-static mutexes,
> which is what libcxx did and still do with my patch, but in a different
> way to avoid the constexpr issue due to the nested volatile types.
If the old code was actually just an initialization but just failing
to work for some technical C++ reasons, I'm sorry for the noise. In
any case it seems like there's a working fix now.
Rich
prev parent reply other threads:[~2016-06-30 14:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 19:24 Zhao, Weiming
2016-06-22 19:34 ` Rich Felker
2016-06-22 19:38 ` Julien Ramseier
2016-06-22 19:41 ` Rich Felker
2016-06-30 12:50 ` Julien Ramseier
2016-06-30 13:15 ` Szabolcs Nagy
2016-06-30 13:38 ` Szabolcs Nagy
2016-06-30 13:45 ` Rich Felker
2016-06-30 13:38 ` Rich Felker
2016-06-30 14:36 ` Julien Ramseier
2016-06-30 14:58 ` 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=20160630145809.GC15995@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).