This is the mail archive of the gdb-prs@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]

[Bug remote/19522] New: remote debugging segfault when reading sharedlib


https://sourceware.org/bugzilla/show_bug.cgi?id=19522

            Bug ID: 19522
           Summary: remote debugging segfault when reading sharedlib
           Product: gdb
           Version: 7.10
            Status: NEW
          Severity: critical
          Priority: P2
         Component: remote
          Assignee: unassigned at sourceware dot org
          Reporter: fchen0000 at gmail dot com
  Target Milestone: ---

gdb/gdbserver version: 7.10.1, gdb crashed.
Output from valgrind gdb:
Reading symbols from /FOO.so...
==10764== Invalid read of size 1
==10764==    at 0x4A07F52: strlen (mc_replace_strmem.c:403)
==10764==    by 0x60FA3A: set_objfile_main_name (objfiles.c:198)
==10764==    by 0x6335B3: load_partial_dies (dwarf2read.c:15903)
==10764==    by 0x63C4DA: process_psymtab_comp_unit_reader (dwarf2read.c:5994)
==10764==    by 0x62E246: init_cutu_and_read_dies (dwarf2read.c:5609)
==10764==    by 0x630F84: process_psymtab_comp_unit (dwarf2read.c:6081)
==10764==    by 0x632438: dwarf2_build_psymtabs (dwarf2read.c:6480)
==10764==    by 0x59AD55: require_partial_symbols (psymtab.c:91)
==10764==    by 0x5A1456: symbol_file_add_with_addrs (symfile.c:1078)
==10764==    by 0x6B7A5C: solib_read_symbols (solib.c:701)
==10764==    by 0x6B7CDA: solib_add (solib.c:1024)
==10764==    by 0x497016: enable_break (solib-svr4.c:2202)
==10764==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==10764== 
==10764== 
==10764== Process terminating with default action of signal 11 (SIGSEGV)
==10764==  Access not within mapped region at address 0x0
==10764==    at 0x4A07F52: strlen (mc_replace_strmem.c:403)
==10764==    by 0x60FA3A: set_objfile_main_name (objfiles.c:198)
==10764==    by 0x6335B3: load_partial_dies (dwarf2read.c:15903)
==10764==    by 0x63C4DA: process_psymtab_comp_unit_reader (dwarf2read.c:5994)
==10764==    by 0x62E246: init_cutu_and_read_dies (dwarf2read.c:5609)
==10764==    by 0x630F84: process_psymtab_comp_unit (dwarf2read.c:6081)
==10764==    by 0x632438: dwarf2_build_psymtabs (dwarf2read.c:6480)
==10764==    by 0x59AD55: require_partial_symbols (psymtab.c:91)
==10764==    by 0x5A1456: symbol_file_add_with_addrs (symfile.c:1078)
==10764==    by 0x6B7A5C: solib_read_symbols (solib.c:701)
==10764==    by 0x6B7CDA: solib_add (solib.c:1024)
==10764==    by 0x497016: enable_break (solib-svr4.c:2202)

My .gdbinit file:
set confirm off
set sysroot /
#handle SIGSTOP noprint ignore
handle SIGSEGV pass noprint nostop
set print thread-events off

After I launch gdb, I did:
target remote remotehost:1840

Where I had gdbserver running and attached to a process.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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