From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Martin Sebor via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [RFC patch] avoid warning on accesses to hardwired address
Date: Fri, 09 Jul 2021 08:34:56 +0200 [thread overview]
Message-ID: <87sg0oj8q7.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <59b05c40-d0a8-233a-27c5-104b24bdc9b4@gmail.com> (Martin Sebor via Libc-alpha's message of "Thu, 8 Jul 2021 18:55:26 -0600")
* Martin Sebor via Libc-alpha:
> Thanks to recent code refactoring in GCC 12, -Warray-bounds has
> started to diagnose accesses to constant addresses just like many
> other flow based warnings do (e.g., -Wstringop-overflow).
> The warnings are meant to help detect accesses resulting from
> invalid arithmetic on null pointers. There may be a better way
> to detect them but GCC doesn't have the detection yet. This
> warning change has in turn exposed Glibc's uses of this trick
> in the implementation of the THREAD_SELF macro.
The warning needs to be disabled in GCC for named address spaces. Null
pointers are not special for them.
Thanks,
Florian
next prev parent reply other threads:[~2021-07-09 6:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 0:55 [RFC patch] avoid warning on accesses to hardwired address Martin Sebor via Libc-alpha
2021-07-09 6:34 ` Florian Weimer via Libc-alpha [this message]
2021-07-21 13:06 ` Florian Weimer via Libc-alpha
2021-07-21 16:17 ` Martin Sebor via Libc-alpha
2021-08-16 11:27 ` Martin Liška
2021-08-16 15:24 ` Martin Sebor via Libc-alpha
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg0oj8q7.fsf@oldenburg.str.redhat.com \
--to=libc-alpha@sourceware.org \
--cc=fweimer@redhat.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).