From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EB5FD385380D; Mon, 16 May 2022 13:51:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB5FD385380D From: "jeanmichael.celerier at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/29153] DW_FORM_rnglistx index pointing outside of .debug_rnglists offset array Date: Mon, 16 May 2022 13:51:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jeanmichael.celerier at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2022 13:51:13 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29153 --- Comment #6 from Jean-Micha=C3=ABl Celerier --- I tried to print the values of this_cu, per_objfile and diep (I assume "die pointer") but I can't seem to see any object file name in there... here is what I tried: (gdb) p cu $1 =3D (dwarf2_cu *) 0x5555565e9990 (gdb) p *cu $2 =3D {header =3D {length =3D 44, version =3D 5 '\005', addr_size =3D 8 '\= b', signed_addr_p =3D 0 '\000', abbrev_sect_off =3D (unknown: 0x270), offset_si= ze =3D 4, initial_length_size =3D 4, unit_type =3D DW_UT_skeleton, first_die_cu_offse= t =3D (unknown: 0x14),=20 sect_off =3D (unknown: 0x965), type_cu_offset_in_tu =3D 0, signature =3D 13299366176265434227}, base_address =3D {{m_dummy =3D {}, m= _item =3D 0, dont_use =3D 0 '\000'}, m_instantiated =3D true}, language_defn =3D 0x55= 555636af50 ,=20 producer =3D 0x7fffa35355e9 "clang version 14.0.0", m_builder =3D std::unique_ptr =3D {get() =3D 0x0}, m_dependencies =3D = 0x0, list_in_scope =3D 0x0, partial_dies =3D 0x5555566f3e00, comp_unit_obstack = =3D { =3D {chunk_size =3D 4064,=20 chunk =3D 0x5555568d3360, object_base =3D 0x5555568d3890 "", next_fre= e =3D 0x5555568d3890 "", chunk_limit =3D 0x5555568d4340 "", temp =3D {i =3D 7809933825093420288, p =3D 0x6c62756f64004500}, alignment_mask =3D 15, chun= kfun =3D { plain =3D 0x5555556a014d , extra =3D 0x5555556a014d }, freefun =3D {plain =3D 0x55555567570e (void= *)>, extra =3D 0x55555567570e (void*)>}, extra_arg =3D 0x5555565e9a6= 0, use_extra_arg =3D 0, maybe_empty_object =3D 0,=20 alloc_failed =3D 0}, }, per_cu =3D 0x5555566fd4d0, per_objfile =3D 0x555556454460, last_used =3D 0, die_hash =3D 0x0, dies =3D= 0x0, line_header =3D 0x0, line_header_die_owner =3D 0x0, method_list =3D std::ve= ctor of length 0, capacity 0,=20 call_site_htab =3D 0x0, dwo_unit =3D 0x555556717610, addr_base =3D {{m_du= mmy =3D {}, m_item =3D 8, dont_use =3D 8 '\b'}, m_instantiated =3D true}, gnu_ranges_base =3D 0, rnglists_base =3D 45, loclist_base =3D 0,=20 rust_unions =3D std::vector of length 0, capacity 0, str_offsets_base =3D {{m_dummy =3D {}, m_item =3D 8, dont_use =3D 8 '\b'}, m_ins= tantiated =3D true}, m_mark =3D false, has_loclist =3D false, checked_producer =3D fa= lse,=20 producer_is_gxx_lt_4_6 =3D false, producer_is_gcc_lt_4_3 =3D false, producer_is_gcc_11 =3D false, producer_is_icc =3D false, producer_is_icc_lt= _14 =3D false, producer_is_codewarrior =3D false, processing_has_namespace_info =3D= false, load_all_dies =3D true} (gdb) f 5 #5 0x000055555588cfee in cutu_reader::cutu_reader (this=3D0x7fffffffcc90, this_cu=3D0x5555566fd4d0, per_objfile=3D0x555556454460, abbrev_table=3D0x5555566f54a0, existing_cu=3D0x5555565e9990, skip_partial= =3Dfalse) at ../../gdb/dwarf2/read.c:6656 6656 in ../../gdb/dwarf2/read.c (gdb) p this_cu $3 =3D (dwarf2_per_cu_data *) 0x5555566fd4d0 (gdb) p *this_cu $4 =3D {sect_off =3D (unknown: 0x965), length =3D 48, dwarf_version =3D 5 '= \005', queued =3D 0, is_debug_types =3D 0, is_dwz =3D 0, reading_dwo_directly =3D = 0, tu_read =3D 0, m_header_read_in =3D false, unit_type =3D DW_UT_compile, lang =3D langua= ge_cplus, index =3D 5,=20 section =3D 0x5555566fb450, per_bfd =3D 0x5555566fb3f0, m_header =3D {len= gth =3D 0, version =3D 0 '\000', addr_size =3D 0 '\000', signed_addr_p =3D 0 '\000', abbrev_sect_off =3D 0, offset_size =3D 0, initial_length_size =3D 0, unit_t= ype =3D 0, first_die_cu_offset =3D 0,=20 sect_off =3D 0, type_cu_offset_in_tu =3D 0, signature =3D 0}, fnd =3D std::unique_ptr =3D {get() =3D 0x55555657db20}, v =3D {= psymtab =3D 0x555556732950, quick =3D 0x555556732950}, imported_symtabs =3D 0x0} (gdb) p *this $5 =3D { =3D {abfd =3D 0x5555565dd260, cu =3D 0x5555565e9= 990, dwo_file =3D 0x0, die_section =3D 0x5555566fb450, buffer =3D 0x5555566fc880= "$", buffer_end =3D 0x5555566fd2c8 "\201", abbrev_table =3D 0x5555566f54a0},=20 info_ptr =3D 0x5555566fd1f9 "\001\355\001", comp_unit_die =3D 0x0, dummy_= p =3D false, m_this_cu =3D 0x5555566fd4d0, m_new_cu =3D std::unique_ptr =3D {get() =3D 0x0}, m_abbrev_table_holder =3D std::unique_ptr = =3D {get() =3D 0x5555566f54a0},=20 m_dwo_abbrev_table =3D std::unique_ptr =3D {get() =3D 0x0}} (gdb) f 18 #18 0x0000555555c007dd in syms_from_objfile (objfile=3D0x555556431770, addr= s=3D0x0, add_flags=3D...) at ../../gdb/symfile.c:985 985 ../../gdb/symfile.c: Le dossier n'est pas vide. (gdb) p *objfile $6 =3D {original_name =3D 0x555556630bc0 "/tmp/build-developer-llvm14-mold-qt5-rhi/./ossia-score", addr_low =3D 0, f= lags =3D {m_enum_value =3D (OBJF_REORDERED | OBJF_USERLOADED | OBJF_PSYMTABS_READ | OBJF_MAINLINE)}, pspace =3D 0x5555563b73b0,=20 compunit_symtabs =3D 0x0, obfd =3D 0x5555565dd260, per_bfd =3D 0x5555565f= 6020, mtime =3D 1652630869, objfile_obstack =3D {chunk_size =3D 4064, chunk =3D 0x555556630bb0, object_base =3D 0x555556631050 "", next_free =3D 0x55555663= 1050 "", chunk_limit =3D 0x555556631b90 "",=20 temp =3D {i =3D 0, p =3D 0x0}, alignment_mask =3D 15, chunkfun =3D {pla= in =3D 0x5555556a014d , extra =3D 0x5555556a014d }, freefun =3D {plain =3D 0x555555ab21bd (void*)>, extra =3D 0x555= 555ab21bd (void*)>},=20 extra_arg =3D 0x0, use_extra_arg =3D 0, maybe_empty_object =3D 0, alloc= _failed =3D 0}, sf =3D 0x55555633a040 , qf =3D std::forward_list =3D {[0] = =3D std::unique_ptr =3D {get() =3D 0x555556606ad0}}, registry_data =3D { data =3D 0x5555565f3e60, num_data =3D 26}, section_offsets =3D std::vec= tor of length 46, capacity 46 =3D {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,= 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, = 0, 0, 0},=20 sect_index_text =3D 12, sect_index_data =3D 26, sect_index_bss =3D 29, sect_index_rodata =3D 17, sections =3D 0x555556630c00, sections_end =3D 0x555556631050, separate_debug_objfile =3D 0x0, separate_debug_objfile_back= link =3D 0x0, separate_debug_objfile_link =3D 0x0,=20 stats =3D {n_syms =3D 0, n_stabs =3D 0, n_types =3D 0, sz_strtab =3D 0}, template_symbols =3D 0x0, static_links =3D std::unique_ptr =3D {get()= =3D 0x0}, jiter_data =3D std::unique_ptr =3D {get() =3D 0x0},=20 jited_data =3D std::unique_ptr =3D {get() =3D 0x0}, skip_jit_symbol_lookup =3D false} (gdb) f 5 #5 0x000055555588cfee in cutu_reader::cutu_reader (this=3D0x7fffffffcc90, this_cu=3D0x5555566fd4d0, per_objfile=3D0x555556454460, abbrev_table=3D0x5555566f54a0, existing_cu=3D0x5555565e9990, skip_partial= =3Dfalse) at ../../gdb/dwarf2/read.c:6656 6656 ../../gdb/dwarf2/read.c: Aucun fichier ou dossier de ce type. (gdb) p *per_objfile=20 $7 =3D {objfile =3D 0x555556431770, per_bfd =3D 0x5555566fb3f0, die_type_ha= sh =3D std::unique_ptr =3D {get() =3D 0x0}, line_header_hash =3D std::unique= _ptr =3D {get() =3D 0x0}, sym_cu =3D 0x0, m_symtabs =3D std::vector of length 0,= capacity 0,=20 m_type_units =3D std::unordered_map with 0 elements, m_type_map =3D std::unordered_map with 0 elements, m_dwarf2_cus =3D std::unordered_map wit= h 0 elements} (gdb) f 3 #3 0x00005555558af463 in read_full_die_1 (reader=3D0x7fffffffcc90, diep=3D0x7fffffffccd0, info_ptr=3D0x5555566fd215 ",", num_extra_attrs=3D0) = at ../../gdb/dwarf2/read.c:18913 18913 in ../../gdb/dwarf2/read.c (gdb) p *this No symbol "this" in current context. (gdb) p *diep $8 =3D (die_info *) 0x0 (gdb) f 4 #4 0x00005555558af500 in read_full_die (reader=3D0x7fffffffcc90, diep=3D0x7fffffffccd0, info_ptr=3D0x5555566fd1f9 "\001\355\001") at ../../gdb/dwarf2/read.c:18930 18930 in ../../gdb/dwarf2/read.c (gdb) p *diep $9 =3D (die_info *) 0x0 (gdb) p *info_ptr $10 =3D 1 '\001' --=20 You are receiving this mail because: You are on the CC list for the bug.=