From: Zack Weinberg <zackw@panix.com>
To: Stefan Liebler <stli@linux.ibm.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Fix string/tst-xbzero-opt if build with gcc head.
Date: Thu, 12 Jul 2018 16:42:00 -0000 [thread overview]
Message-ID: <CAKCAbMh8D9uqnFz5+HCJW8177-fj9erFx92uhhDh4hs7epLfGA@mail.gmail.com> (raw)
In-Reply-To: <a1bd8b21-c935-125f-0b9c-381f0ed19b5a@linux.ibm.com>
On Thu, Jul 12, 2018 at 10:22 AM, Stefan Liebler <stli@linux.ibm.com> wrote:
> Fix string/tst-xbzero-opt is build with gcc head.
...
> In setup_no_clear / setup_ordinary_clear, GCC is omitting the memcpy loop in
> prepare_test_buffer. Thus count_test_patterns does not find any of the
> test_pattern.
>
> This patch introduces a compiler barrier just after filling the buffer.
I think I understand why the call to swapcontext in
prepare_test_buffer is not a sufficient compiler barrier, but I am not
a fan of asm volatile ("" ::: "memory"), because I fully expect some
future compiler to decide that there are no actual assembly
instructions being inserted so the statement can be completely
ignored. I would prefer us to find some kind of construct that
actually does make externally-visible side effects depend on the
contents of 'buf' in terms of the C abstract machine.
zw
next prev parent reply other threads:[~2018-07-12 16:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 14:22 Stefan Liebler
2018-07-12 16:42 ` Zack Weinberg [this message]
2018-07-16 11:05 ` Stefan Liebler
2018-07-16 12:36 ` Zack Weinberg
2018-07-16 13:13 ` Stefan Liebler
2018-07-16 13:18 ` Zack Weinberg
2018-07-23 6:42 ` Stefan Liebler
2018-07-26 13:33 ` Carlos O'Donell
2018-07-26 15:13 ` [COMMITTED] " Stefan Liebler
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=CAKCAbMh8D9uqnFz5+HCJW8177-fj9erFx92uhhDh4hs7epLfGA@mail.gmail.com \
--to=zackw@panix.com \
--cc=libc-alpha@sourceware.org \
--cc=stli@linux.ibm.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.
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).