This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug backtrace/16577] GDB crash on attempted read from deleted shared library
- From: "mgulick at mathworks dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 18 Oct 2017 20:00:43 +0000
- Subject: [Bug backtrace/16577] GDB crash on attempted read from deleted shared library
- Auto-submitted: auto-generated
- References: <bug-16577-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16577
Mike Gulick <mgulick at mathworks dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mgulick at mathworks dot com
--- Comment #3 from Mike Gulick <mgulick at mathworks dot com> ---
I bisected this crash and git points to commit
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=4bf44c1cf1abad13fcda09e20983757f175c6dca
Debugging gdb built from this revision gives the following stack trace:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000739dd8 in bfd_getl32 (p=0x0) at libbfd.c:622
622 v = (unsigned long) addr[0];
(gdb) bt
#0 0x0000000000739dd8 in bfd_getl32 (p=0x0) at libbfd.c:622
#1 0x00000000006694ac in read_initial_length (abfd=0x11fe4110, buf=0x0,
bytes_read_ptr=0x7ffc4e4dcd84) at dwarf2-frame.c:1526
#2 0x0000000000669eb6 in decode_frame_entry_1 (unit=0x145a6410, start=0x0,
eh_frame_p=1, cie_table=0x7ffc4e4dcef0, fde_table=0x7ffc4e4dcee0,
entry_type=EH_CIE_OR_FDE_TYPE_ID) at dwarf2-frame.c:1837
#3 0x000000000066aa43 in decode_frame_entry (unit=0x145a6410, start=0x0,
eh_frame_p=1, cie_table=0x7ffc4e4dcef0, fde_table=0x7ffc4e4dcee0,
entry_type=EH_CIE_OR_FDE_TYPE_ID) at dwarf2-frame.c:2135
#4 0x000000000066af60 in dwarf2_build_frame_info (objfile=0x1484e2a0)
at dwarf2-frame.c:2292
#5 0x0000000000669b86 in dwarf2_frame_find_fde (pc=0x7ffc4e4dd070,
out_offset=0x0) at dwarf2-frame.c:1749
#6 0x0000000000669245 in dwarf2_frame_sniffer (
self=0x8a4da0 <dwarf2_frame_unwind>, this_frame=0x116fd00,
this_cache=0x116fd18) at dwarf2-frame.c:1382
#7 0x00000000006d735f in frame_unwind_find_by_frame (this_frame=0x116fd00,
this_cache=0x116fd18) at frame-unwind.c:112
#8 0x00000000006d2a1a in get_frame_id (fi=0x116fd00) at frame.c:334
#9 0x00000000005b6399 in step_1 (skip_subroutines=1, single_inst=0,
count_string=0x0) at infcmd.c:917
#10 0x00000000005b61bf in next_command (count_string=0x0, from_tty=1)
at infcmd.c:855
I believe there are two separate issues to (possibly) fix here:
1. The gdb segfault when stepping the debugger.
2. The errors/warnings about not being able to open the jna file.
I have a preliminary patch to fix 1) that I will post to gdb-patches for
feedback. It is debatable whether 2) should be fixed, as that likely involves
a special-case to detect and bypass jna files that could yield false-positives.
--
You are receiving this mail because:
You are on the CC list for the bug.