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

* [Bug symtab/29336] [gdb, debug-types, debug-names] Bad CU index complaint not triggered
  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 ` vries at gcc dot gnu.org
  2022-07-14 10:36 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-08  9:10 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Hmm, there are similar complaints for gdb-index, perhaps the same problem in
dw2_symtab_iter_next?

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

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

* [Bug symtab/29336] [gdb, debug-types, debug-names] Bad CU index complaint not triggered
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-14 10:36 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14210
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14210&action=edit
tentative patch

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

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

* [Bug symtab/29336] [gdb, debug-types, debug-names] Bad CU index complaint not triggered
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-14 10:38 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

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

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

* [Bug symtab/29336] [gdb, debug-types, debug-names] Bad CU index complaint not triggered
  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
                   ` (2 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-14 13:35 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> Hmm, there are similar complaints for gdb-index, perhaps the same problem in
> dw2_symtab_iter_next?

Filed as PR29367.

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

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

* [Bug symtab/29336] [gdb, debug-types, debug-names] Bad CU index complaint not triggered
  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
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-14 14:44 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Submitted patch:
https://sourceware.org/pipermail/gdb-patches/2022-July/190750.html

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

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

* [Bug symtab/29336] [gdb, debug-types, debug-names] Bad CU index complaint not triggered
  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
                   ` (4 preceding siblings ...)
  2022-07-14 14:44 ` vries at gcc dot gnu.org
@ 2022-07-21 11:17 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-21 11:17 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |13.1
         Resolution|---                         |FIXED

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=2fe9a3c41faa71b1f2bde40e818187491a5a9925

-- 
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).