This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash regression for gdb.dwarf2/dw2-inheritance.exp [Re: [RFA 3/3] Initial Fission support, the actual Fission stuff]


On Sun, Apr 29, 2012 at 1:57 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Wed, 18 Apr 2012 20:57:38 +0200, Doug Evans wrote:
>> 2012-04-18 ?Doug Evans ?<dje@google.com>
>>
>> ? ? ? Initial support for Fission. ?http://gcc.gnu.org/wiki/DebugFission
>
> ?Running gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp ...
> -PASS: gdb.dwarf2/dw2-inheritance.exp: ptype inherited
> +ERROR: couldn't load /unsafegdb/testsuite.unix.-m32/gdb.dwarf2/dw2-inheritance.x into /unsafegdb/testsuite.unix.-m32/../../gdb/gdb (end of file).
> +ERROR: Couldn't send ptype inherited to GDB.
> +UNRESOLVED: gdb.dwarf2/dw2-inheritance.exp: ptype inherited
>
> Program terminated with signal 11, Segmentation fault.
> #0 ?0x000000000063037c in dwarf_decode_line_header (offset=0, cu=0x2c4b410) at dwarf2read.c:12320
> 12320 ? ? abfd = section->asection->owner;
> (gdb) p section->asection
> $2 = (asection *) 0x0
> (gdb) bt
> #0 ?0x000000000063037c in dwarf_decode_line_header (offset=0, cu=0x2c4b410) at dwarf2read.c:12320
> #1 ?0x000000000061c354 in dwarf2_build_include_psymtabs (cu=0x2c4b410, die=0x2c4b5d0, pst=0x2c2d810) at dwarf2read.c:3324
> #2 ?0x000000000061e46b in process_psymtab_comp_unit_reader (reader=0x7fff3fa1ac90, info_ptr=0x2c2d777 "\003base", comp_unit_die=0x2c4b5d0, has_children=1,
> ? ?data=0x0) at dwarf2read.c:4159
> #3 ?0x000000000061dc53 in init_and_read_dies_worker (this_cu=0x2c2d7a0, use_existing_cu=0, keep=0, die_reader_func=
> ? ?0x61e036 <process_psymtab_comp_unit_reader>, data=0x0) at dwarf2read.c:3895
> #4 ?0x000000000061dd12 in init_cu_and_read_dies (this_cu=0x2c2d7a0, use_existing_cu=0, keep=0, die_reader_func=0x61e036 <process_psymtab_comp_unit_reader>,
> ? ?data=0x0) at dwarf2read.c:3936
> #5 ?0x000000000061e4f9 in process_psymtab_comp_unit (this_cu=0x2c2d7a0) at dwarf2read.c:4178
> #6 ?0x000000000061e726 in dwarf2_build_psymtabs_hard (objfile=0x2c386d0) at dwarf2read.c:4269
> #7 ?0x000000000061bca2 in dwarf2_build_psymtabs (objfile=0x2c386d0) at dwarf2read.c:3133
> #8 ?0x0000000000508db2 in read_psyms (objfile=0x2c386d0) at elfread.c:1449
> #9 ?0x000000000058f9be in require_partial_symbols (objfile=0x2c386d0, verbose=0) at psymtab.c:92
>
> It happens on RHEL-6 i386/x86_68/x86_64-m32. ?Feel free to request more info.
>
>
> Regards,
> Jan

Hi.
I can't recreate this on my fc16 box (neither i386 nor amd64), but the
it's easy enough to see what the issue is.

Can you test this patch?  Regression tested here.
It also fixes a potential segv in dwarf_decode_macros.

2012-04-29  Doug Evans  <dje@seba.sebabeach.org>

        * dwarf2read.c (dwarf_decode_macros): New arg section_name.
        All callers updated.
        (init_cu_die_reader): Verify the section is non-empty.
        (dwarf_decode_line_header): Don't dereference section->asection
        until we know the section is present.  Return NULL, not 0.

Attachment: gdb-120429-fission-supplement-3-1.patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]