This is the mail archive of the
mailing list for the GCC project.
Re: libbacktrace: walk the elf_syminfo_data chain in elf_syminfo
- From: Ian Lance Taylor <iant at google dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Jul 2013 08:29:20 -0700
- Subject: Re: libbacktrace: walk the elf_syminfo_data chain in elf_syminfo
- References: <alpine dot LNX dot 2 dot 00 dot 1307221718150 dot 1061 at monopod dot intra dot ispras dot ru>
On Mon, Jul 22, 2013 at 6:26 AM, Alexander Monakov <email@example.com> wrote:
> this fixes a bug (found by inspection) that would prevent elf_syminfo from
> looking up symbols defined in modules other than the executable.
> Bootstrapped and regtested together with the next patch on x86_64-linux
> (excluding Java, including Go), OK for trunk?
> 2013-07-22 Alexander Monakov <firstname.lastname@example.org>
> * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
Thanks for noticing the problem. This patch isn't enough by itself.
The code has to protect itself against the list changing in
mid-stream. See dwarf_fileline in dwarf.c.