From: Mark Wielaard <mark@klomp.org>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Workaround stringop-overread warning in debuginfod-support.c on powerpc64
Date: Tue, 31 May 2022 11:05:22 +0200 [thread overview]
Message-ID: <0f5c5a76969801002e5b2f9b224e6bdc58b41c1d.camel@klomp.org> (raw)
In-Reply-To: <e5fb1b8e-d86d-fd88-e3f2-b29f151d5264@simark.ca>
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
Hi Simon,
On Wed, 2022-05-11 at 20:49 -0400, Simon Marchi wrote:
> On 2022-05-11 18:52, Mark Wielaard wrote:
> > Alternatively we could just suppress this warning for any
> > architecture.
>
> Let's make a deal, if you find a 3rd architecture where this is the
> case we do that, alright? ;)
Got another on hppa:
https://sourceware.org/bugzilla/show_bug.cgi?id=29198
So, ok to push the attached?
Thanks,
Mark
[-- Attachment #2: 0001-gdb-Always-suppress-stringop-overread-warning-in-deb.patch --]
[-- Type: text/x-patch, Size: 1767 bytes --]
From 0a1bd604d3037272d89c7c3e9ddc02e513e1027a Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Tue, 31 May 2022 11:00:06 +0200
Subject: [PATCH] gdb: Always suppress stringop-overread warning in
debuginfod-support.c
Just like on s390x with g++ 11.2.1 and ppc64le with g++ 11.3.1 g++ 11
on hppa produces a spurious warning for stringop-overread in
debuginfod_is_enabled for url_view. Just always suppress it on all
arches.
https://sourceware.org/bugzilla/show_bug.cgi?id=29198
gdb/ChangeLog:
* debuginfod-support.c (debuginfod_is_enabled): Always use
DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD.
---
gdb/debuginfod-support.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
index 6dc08fc29b6..bd355b67352 100644
--- a/gdb/debuginfod-support.c
+++ b/gdb/debuginfod-support.c
@@ -193,17 +193,14 @@ debuginfod_is_enabled ()
if (off == gdb::string_view::npos)
break;
url_view = url_view.substr (off);
-#if defined (__s390x__) || defined (__powerpc64__)
- /* g++ 11.2.1 on s390x and g++ 11.3.1 on ppc64le seem convinced
- url_view might be of SIZE_MAX length. And so complains
- because the length of an array can only be PTRDIFF_MAX. */
+ /* g++ 11.2.1 on s390x, g++q 11.3.1 on ppc64le and g++ 11 on
+ hppa seem convinced url_view might be of SIZE_MAX length.
+ And so complains because the length of an array can only
+ be PTRDIFF_MAX. */
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD
-#endif
off = url_view.find_first_of (' ');
-#if defined (__s390x__) || defined (__powerpc64__)
DIAGNOSTIC_POP
-#endif
gdb_printf
(_(" <%ps>\n"),
styled_string (file_name_style.style (),
--
2.18.4
next prev parent reply other threads:[~2022-05-31 9:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 22:52 Mark Wielaard
2022-05-12 0:49 ` Simon Marchi
2022-05-31 9:05 ` Mark Wielaard [this message]
2022-05-31 9:46 ` Pedro Alves
2022-05-31 10:51 ` Mark Wielaard
2022-06-06 11:27 ` Mark Wielaard
2022-06-06 16:42 ` Pedro Alves
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=0f5c5a76969801002e5b2f9b224e6bdc58b41c1d.camel@klomp.org \
--to=mark@klomp.org \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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).