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 gdb/23035] New: lzma_pread doesn't read in ELF program header properly


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

            Bug ID: 23035
           Summary: lzma_pread doesn't read in ELF program header properly
           Product: gdb
           Version: 8.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

lzma_pread is used to read ELF program header:

(top-gdb) bt
#0  lzma_pread (nbfd=0x124dc20, stream=0x12653d0, buf=0x7fffffffd010, 
    nbytes=56, offset=176)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/minidebug.c:204
#1  0x0000000000902be6 in opncls_bread (abfd=0x124dc20, buf=0x7fffffffd010, 
    nbytes=56) at /export/gnu/import/git/sources/binutils-gdb/bfd/opncls.c:503
#2  0x00000000008fd03b in bfd_bread (ptr=0x7fffffffd010, size=56, 
    abfd=0x124dc20)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/bfdio.c:196
#3  0x000000000091f634 in bfd_elf64_object_p (abfd=0x124dc20)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/elfcode.h:790
#4  0x00000000008ffa08 in bfd_check_format_matches (abfd=0x124dc20, 
    format=bfd_object, matching=0x0)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/format.c:311
#5  0x00000000008ff453 in bfd_check_format (abfd=0x124dc20, format=bfd_object)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/format.c:94
#6  0x0000000000766399 in find_separate_debug_file_in_section (
    objfile=0x1265010)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/minidebug.c:277
#7  0x00000000008039a2 in read_symbols (objfile=0x1265010, add_flags=...)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/symfile.c:803
#8  0x0000000000804071 in syms_from_objfile_1 (objfile=0x1265010, 
    addrs=0x7fffffffd530, add_flags=...)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/symfile.c:992
---Type <return> to continue, or q <return> to quit---
#9  0x0000000000804109 in syms_from_objfile (objfile=0x1265010, 
    addrs=0x7fffffffd530, add_flags=...)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/symfile.c:1008
#10 0x000000000080447b in symbol_file_add_with_addrs (abfd=0x12697b0, 
    name=0x126a280 "/lib64/libgcc_s.so.1", add_flags=..., 
    addrs=0x7fffffffd530, flags=..., parent=0x0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/symfile.c:1113
#11 0x000000000080472c in symbol_file_add_from_bfd (
During symbol reading, Child DIE 0x2cd844a and its abstract origin 0x2cd83e9
have different parents.
During symbol reading, Multiple children of DIE 0x2cd9d43 refer to DIE
0x2cd9d40 as their abstract origin.
abfd=0x12697b0, name=0x126a280 "/lib64/libgcc_s.so.1", add_flags=..., 
    addrs=0x7fffffffd530, flags=..., parent=0x0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/symfile.c:1197
#12 0x00000000007e8433 in solib_read_symbols (so=0x126a070, flags=...)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/solib.c:691
#13 0x00000000007e8d7b in solib_add (pattern=0x0, from_tty=0, readsyms=1)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/solib.c:1003
#14 0x00000000007e98ab in handle_solib_event ()
    at /export/gnu/import/git/sources/binutils-gdb/gdb/solib.c:1281
During symbol reading, cannot get low and high bounds for subprogram DIE at
25013821.
#15 0x00000000005b8b2e in bpstat_stop_status (aspace=0x108a190, 
    bp_addr=140737354039592, ptid=..., ws=0x7fffffffd9d0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/breakpoint.c:5454
#16 0x000000000071e59a in handle_signal_stop (ecs=0x7fffffffd9b0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/infrun.c:5944
#17 0x000000000071d414 in handle_inferior_event_1 (ecs=0x7fffffffd9b0)
---Type <return> to continue, or q <return> to quit---
   t/gnu/import/git/sources/binutils-gdb/gdb/infrun.c:5375
#18 0x000000000071d547 in handle_inferior_event (ecs=0x7fffffffd9b0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/infrun.c:5410
#19 0x000000000071a747 in fetch_inferior_event (client_data=0x0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/infrun.c:3926
#20 0x0000000000707637 in inferior_event_handler (event_type=INF_REG_EVENT, 
    client_data=0x0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/inf-loop.c:43
#21 0x0000000000461097 in handle_target_event (error=0, client_data=0x0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/linux-nat.c:4465
#22 0x00000000006c4678 in handle_file_event (file_ptr=0x10ebec0, ready_mask=1)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/event-loop.c:733
#23 0x00000000006c4c1b in gdb_wait_for_event (block=0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/event-loop.c:859
#24 0x00000000006c3a84 in gdb_do_one_event ()
    at /export/gnu/import/git/sources/binutils-gdb/gdb/event-loop.c:322
#25 0x00000000006c3b30 in start_event_loop ()
    at /export/gnu/import/git/sources/binutils-gdb/gdb/event-loop.c:371
#26 0x000000000074e802 in captured_command_loop ()
    at /export/gnu/import/git/sources/binutils-gdb/gdb/main.c:330
#27 0x000000000074fb85 in captured_main (data=0x7fffffffdce0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/main.c:1157
#28 0x000000000074fc4b in gdb_main (args=0x7fffffffdce0)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/main.c:1173
#29 0x000000000040ddcd in main (argc=2, argv=0x7fffffffdde8)
    at /export/gnu/import/git/sources/binutils-gdb/gdb/gdb.c:32
(top-gdb) 

Somehow wrong bytes are read in as ELF program header.

-- 
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]