From: mlimber <mlimber@gmail.com>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [PR 25678] gdb crashes with "internal-error: sect_index_text not initialized" when .text
Date: Wed, 20 May 2020 11:04:15 -0400 [thread overview]
Message-ID: <CAAogRRqaS_mw8ndtkkH7-Oq+euitTrbE9kiPcU7OpgGQi8ZavA@mail.gmail.com> (raw)
In-Reply-To: <b57d72e1-2214-e57f-c8b1-4bc4a8096e91@simark.ca>
On Wed, May 20, 2020 at 10:12 AM Simon Marchi <simark@simark.ca> wrote:
> On 2020-05-20 9:24 a.m., mlimber wrote:
> > Will both bugs be fixed by a change in one place? That is, is my second
> patch irrelevant because we'll ultimately fix both bugs at some higher
> level? If the patch is still valid, I could work to submit an updated patch
> and test case for my non-DWARF bug now, and then you (or you and I) can
> work up a test case and fix -- possibly under a new bug ticket -- for the
> DWARF bug.
>
> There are two paths forward I see:
>
> (1) make sure sect_index_text is always initialized, even if there's no
> .text section
> (2) make GDB aware that sect_index_text could be left to -1
>
> If we chose (1), then the fixes in your patches wouldn't be needed, as
> sect_index_text will
> never be -1.
>
> If we chose (2), then we should get rid of the code that invents a
> sect_index_text value
> when there's no .text section. The fixes in your patches would be needed
> (or something
> equivalent), but there would be many other similar fixes needed.
>
> I posted this RFC patch that summarizes the problem and starts to
> implement (2):
>
> https://sourceware.org/pipermail/gdb-patches/2020-May/168767.html
>
Thanks for digging into this! I took a look. I'm still willing to assist if
needed, but you've gone beyond my knowledge of GDB and ELF internals, so
I'm not sure if I can be very useful to you. Let me know if there is
something further I can do.
M
PS, I'm surprised mailing list patches are still a thing in the age of
Github!
prev parent reply other threads:[~2020-05-20 15:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 17:22 mlimber
2020-05-14 17:32 ` Simon Marchi
2020-05-14 17:48 ` mlimber
2020-05-14 17:57 ` Simon Marchi
2020-05-14 19:12 ` mlimber
2020-05-14 19:28 ` Simon Marchi
2020-05-15 18:33 ` mlimber
2020-05-16 20:39 ` mlimber
2020-05-16 21:05 ` Simon Marchi
2020-05-17 3:31 ` Simon Marchi
2020-05-17 7:01 ` Andreas Schwab
2020-05-17 14:01 ` Simon Marchi
2020-05-17 14:08 ` Simon Marchi
2020-05-18 18:01 ` Simon Marchi
2020-05-18 21:11 ` mlimber
2020-05-18 21:44 ` Simon Marchi
2020-05-19 14:36 ` mlimber
2020-05-19 14:44 ` Simon Marchi
2020-05-20 13:24 ` mlimber
2020-05-20 14:12 ` Simon Marchi
2020-05-20 15:04 ` mlimber [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=CAAogRRqaS_mw8ndtkkH7-Oq+euitTrbE9kiPcU7OpgGQi8ZavA@mail.gmail.com \
--to=mlimber@gmail.com \
--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