From: Florian Weimer <fweimer@redhat.com>
To: Justin Chen via Libc-help <libc-help@sourceware.org>
Cc: Justin Chen <justinpopo6@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: Glibc pthread_rwlock_timed*() Optimization Bug
Date: Wed, 08 Sep 2021 08:20:41 +0200 [thread overview]
Message-ID: <87r1dzr3k6.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAJx26kU_T=uam6uZOcHJ9_a-G2onePtHCU9q2F2g0OhoJzR51w@mail.gmail.com> (Justin Chen via Libc-help's message of "Tue, 7 Sep 2021 14:31:58 -0700")
* Justin Chen via Libc-help:
> It seems like the compiler is incorrectly optimizing the loop because
> it is not informed that the value of __wrphase_futex can be changed in
> another context, which I believe should be done with the volatile
> attribute.
> Does this analysis look correct?
Yes, it's a bug/misfeature in our custom atomics implementation. Thanks
for tracking it down.
Florian
prev parent reply other threads:[~2021-09-08 6:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 21:31 Justin Chen
2021-09-07 21:33 ` Florian Fainelli
2021-09-08 6:14 ` Florian Weimer
2021-09-08 6:20 ` 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=87r1dzr3k6.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=f.fainelli@gmail.com \
--cc=justinpopo6@gmail.com \
--cc=libc-help@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).