From: Keith Seitz <keiths@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>,
Simon Marchi <simon.marchi@efficios.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: work around negative DW_AT_data_member_location GCC 11 bug
Date: Wed, 26 Jan 2022 10:30:52 -0800 [thread overview]
Message-ID: <09e59830-968a-0054-b5be-03e2bbe153dc@redhat.com> (raw)
In-Reply-To: <53f71b5f-a989-7eef-0178-9a96a414ece8@redhat.com>
On 1/26/22 10:17, Keith Seitz via Gdb-patches wrote:
> On 1/26/22 09:45, Simon Marchi via Gdb-patches wrote:
>>> diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
>>> index 737d8a4c81b..0c66a6daf97 100644
>>> --- a/gdb/dwarf2/read.c
>>> +++ b/gdb/dwarf2/read.c
>>> @@ -14489,6 +14489,16 @@ handle_member_location (struct die_info *die, struct dwarf2_cu *cu,
>>> if (attr->form_is_constant ())
>>> {
>>> LONGEST offset = attr->constant_value (0);
>>> +
>>> + /* Work around this GCC 11 bug, where it would erroneously use -1
>>> + data member locations, instead of 0:
>>> +
>>> + Negative DW_AT_data_member_location
>>> + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101378
>>> + */
>>> + if (offset == -1)
>>> + offset = 0;
>>> +
I apologize, I forgot to ask: would the more general " < 0" be
appropriate to catch other related bugs, such as fuzzing?
Keith
next prev parent reply other threads:[~2022-01-26 18:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-29 15:37 Simon Marchi
2022-01-26 17:45 ` Simon Marchi
2022-01-26 18:17 ` Keith Seitz
2022-01-26 18:30 ` Keith Seitz [this message]
2022-01-26 19:34 ` Simon Marchi
2022-01-26 19:38 ` Kevin Buettner
2022-01-26 19:40 ` Simon Marchi
2022-01-26 20:18 ` Keith Seitz
2022-01-26 19:18 ` Simon Marchi
2022-01-26 20:23 ` Keith Seitz
2022-01-26 19:49 ` Bruno Larsen
2022-01-26 19:58 ` Simon Marchi
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=09e59830-968a-0054-b5be-03e2bbe153dc@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
--cc=simon.marchi@polymtl.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).