This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv2] PR gdb/17968 - [ppc64] SEGV in ppc64_elf_get_synthetic_symtab reading a separate debug file
- From: Martin Sebor <msebor at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Feb 2015 09:45:20 -0700
- Subject: Re: [patchv2] PR gdb/17968 - [ppc64] SEGV in ppc64_elf_get_synthetic_symtab reading a separate debug file
- Authentication-results: sourceware.org; auth=none
- References: <54E39F4C dot 6050607 at redhat dot com> <54E3D152 dot 6020804 at redhat dot com> <20150225210404 dot GA29761 at host1 dot jankratochvil dot net>
On 02/25/2015 02:04 PM, Jan Kratochvil wrote:
Hi Martin,
[ppc64] SEGV in ppc64_elf_get_synthetic_symtab reading a separate debug file
https://sourceware.org/bugzilla/show_bug.cgi?id=17968
Martin Sebor 2015-02-16 00:42:58 CET
# The problem appears to be due to the change to gdb/elfread.c introduced in the commit below:
# # commit 63524580f8372e38a6a62fd875a4252068c31150
# # Author: Jan Kratochvil <jan.kratochvil@redhat.com>
# # Date: Sun Apr 17 18:38:46 2011 +0000
# # gdb/
# # Fix convert_code_addr_to_desc_addr for ppc64 files after eu-strip.
# # * elfread.c (elf_symfile_read): New variable synth_abfd, pass it to
# # bfd_get_synthetic_symtab.
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=63524580f8372e38a6a62fd875a4252068c31150
I find the patch of mine above right even for object files and your patch only
avoided hitting the stale memory reference by disabling proper .opd parsing.
I admit I suspected that my fix only worked around the problem
without removing the root cause. Glad to know you found a more
appropriate solution.
Martin