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 09:24:43 -0400 [thread overview]
Message-ID: <CAAogRRr5_MpHkhOi_j5_DwzQKYwwgZ2ke-Qrq15JRvygnCEzxA@mail.gmail.com> (raw)
In-Reply-To: <f900bc14-234d-47ce-3181-1e6b6ad7809c@simark.ca>
On Tue, May 19, 2020 at 10:50 AM Simon Marchi <simark@simark.ca> wrote:
> Are we inspecting the same library? In the libicudata.so.52 you've sent,
> there
> are three load segments:
>
> $ readelf -l libicudata.so.52.2 | grep LOAD
> LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x166a940
> 0x166a940 R 0x200000
> LOAD 0x166af30 0x000000000186af30 0x000000000186af30 0x0000d0
> 0x0000d0 RW 0x200000
> LOAD 0x166c000 0x000000000186b000 0x000000000186b000 0x000180
> 0x000180 RW 0x1000
>
Ah, my bad. The lib freshly rebuilt from source has two segments, but the
one I uploaded has three because I manually set the RPATH on it. (The data
lib doesn't really need to be on this since it doesn't have other
dependencies, but it just got caught up in a glob of all the ICU libs.)
So the additional step needed after building from source is to run
`patchelf --set-rpath \$ORIGIN libicudata.so.52.2`.
To reduce confusion (maybe), I have added two files to the same dropbox
folder -- libicudata-unpatched.so.52.2 and libicudata-with-rpath.so.52.2.
(I have left the original files I uploaded there for now.)
(For my own application, I have rebuilt libicu* again after running
`./configure --enable-rpath=yes`, and then I get the RPATHs I need so I
don't need the patchelf at all. Thus my app's problem is resolved.)
> I successfully reproduced the bug using your lib. Since there's no DWARF
> info, it fails in init_entry_point_info. With my lib, it fails earlier,
> when the DWARF info is read. Anyway, it's all variations of the same bug,
> some code assumes that sect_index_text is set to some valid value.<
>
I can now also repro the original bug in a rinky-dink program suitable for
unit testing. Can you supply the steps to build a small program to repro
the DWARF-related bug?
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.
M
next prev parent reply other threads:[~2020-05-20 13:24 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 [this message]
2020-05-20 14:12 ` Simon Marchi
2020-05-20 15:04 ` mlimber
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=CAAogRRr5_MpHkhOi_j5_DwzQKYwwgZ2ke-Qrq15JRvygnCEzxA@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).