public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/29336] New: [gdb, debug-types, debug-names] Bad CU index complaint not triggered
@ 2022-07-08  9:01 vries at gcc dot gnu.org
  2022-07-08  9:10 ` [Bug symtab/29336] " vries at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-08  9:01 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29336
           Summary: [gdb, debug-types, debug-names] Bad CU index complaint
                    not triggered
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

While working on PR29334, I noticed this code right above the DW_IDX_type_unit
handling code:
...
        case DW_IDX_compile_unit:
          /* Don't crash on bad data.  */
          if (ull >= per_bfd->all_comp_units.size ())
            {
              complaint (_(".debug_names entry has bad CU index %s"
                           " [in module %s]"),
                         pulongest (ull),
                         objfile_name (objfile));
              continue;
            }
          per_cu = per_bfd->get_cu (ull);
          break;
...

So, if I have 5 CUs and 5 TUs, and a ull CU index of 7, we should complain.

But we don't because we compare with "per_bfd->all_comp_units.size ()" instead
of with "per_bfd->all_comp_units.size () - per_bfd->tu_stats.nr_tus".

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-21 11:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08  9:01 [Bug symtab/29336] New: [gdb, debug-types, debug-names] Bad CU index complaint not triggered vries at gcc dot gnu.org
2022-07-08  9:10 ` [Bug symtab/29336] " vries at gcc dot gnu.org
2022-07-14 10:36 ` vries at gcc dot gnu.org
2022-07-14 10:38 ` vries at gcc dot gnu.org
2022-07-14 13:35 ` vries at gcc dot gnu.org
2022-07-14 14:44 ` vries at gcc dot gnu.org
2022-07-21 11:17 ` vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).