From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EB89A3858C27; Fri, 4 Aug 2023 00:26:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB89A3858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691108783; bh=wq8Z2u2ow1JUx/8BnC9kgXee1jwgU0q1UN4JQYMAyGY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vxmiGIyftpZKQyjL9Tt6/7vb8IuB2VSVZFAOwMRO9FLFDaZ0C3WWD/7HZMukahNKK 250Jriex/IDW7/TZ6sO5hdzJNNUXWJy5zC7+6pQdX4uuc3z8BfZLSwtCM4ZyS3APXm Ghs8VaJeQAbQ5/9dG7F8j2uGeEydxnDe4zbL1ebY= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30718] [gdb/symtab] More index-cache data races Date: Fri, 04 Aug 2023 00:26:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30718 --- Comment #1 from Tom de Vries --- Fixed by the usual: ... diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index 5f7d2dcd895..9dfc435e861 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -104,10 +104,10 @@ struct dwarf2_per_cu_data is_dwz (false), reading_dwo_directly (false), tu_read (false), - mark (false), - files_read (false), queued (false), m_header_read_in (false), + mark (false), + files_read (false), scanned (false) { } @@ -150,14 +150,6 @@ struct dwarf2_per_cu_data This flag is only valid if is_debug_types is true. */ unsigned int tu_read : 1; - /* A temporary mark bit used when iterating over all CUs in - expand_symtabs_matching. */ - unsigned int mark : 1; - - /* True if we've tried to read the file table. There will be no - point in trying to read it again next time. */ - bool files_read : 1; - /* Wrap the following in struct packed instead of bitfields to avoid data races when the bitfields end up on the same memory location (per C++ memory model). */ @@ -176,6 +168,14 @@ struct dwarf2_per_cu_data it private at the moment. */ mutable packed m_header_read_in; + /* A temporary mark bit used when iterating over all CUs in + expand_symtabs_matching. */ + packed mark; + + /* True if we've tried to read the file table. There will be no + point in trying to read it again next time. */ + packed files_read; + private: /* The unit type of this CU. */ std::atomic> m_unit_type {(dwarf_unit_type)0}; ... --=20 You are receiving this mail because: You are on the CC list for the bug.=