public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/29343] New: [gdb/symtab] per_cu->length set without initial_length_size
@ 2022-07-09  8:24 vries at gcc dot gnu.org
  2022-07-09  8:24 ` [Bug symtab/29343] " vries at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-09  8:24 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29343
           Summary: [gdb/symtab] per_cu->length set without
                    initial_length_size
           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: ---

I ran into a race condition for per_cu->length, and while investigating this I
noticed this particular requirement about length:
...
  /* The start offset and length of this compilation unit.                      
     NOTE: Unlike comp_unit_head.length, this length includes                   
     initial_length_size.                                                       
     If the DIE refers to a DWO file, this is always of the original die,       
     not the DWO file.  */
  sect_offset sect_off {};
  unsigned int length = 0;
...

Grepping through the sources shows 3 spots were this requirement is not met:
...
$ grep "cu->length = " gdb/dwarf2/read.c
  the_cu->length = length;
          this_cu->length = cu->header.get_length ();
            this_cu->length = cu->header.get_length ();
  this_cu->length = m_new_cu->header.get_length ();
      this_cu->length = cu_header.length + cu_header.initial_length_size;
...

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

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

end of thread, other threads:[~2022-12-30 12:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09  8:24 [Bug symtab/29343] New: [gdb/symtab] per_cu->length set without initial_length_size vries at gcc dot gnu.org
2022-07-09  8:24 ` [Bug symtab/29343] " vries at gcc dot gnu.org
2022-07-09  8:34 ` vries at gcc dot gnu.org
2022-07-09  9:17 ` vries at gcc dot gnu.org
2022-07-11  9:40 ` vries at gcc dot gnu.org
2022-07-13  7:41 ` vries at gcc dot gnu.org
2022-07-13  7:42 ` [Bug symtab/29343] [gdb/symtab] c++-ify comp_unit_head vries at gcc dot gnu.org
2022-12-24 22:45 ` tromey at sourceware dot org
2022-12-25  8:25 ` vries at gcc dot gnu.org
2022-12-26 20:59 ` cvs-commit at gcc dot gnu.org
2022-12-26 21:03 ` tromey at sourceware dot org
2022-12-30 12:55 ` cvs-commit 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).