From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A4A243858405; Tue, 24 Aug 2021 14:03:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4A243858405 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/27893] [fission] segfault in dw2_expand_symtabs_matching_one Date: Tue, 24 Aug 2021 14:03:45 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey 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: Tue, 24 Aug 2021 14:03:45 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27893 --- Comment #10 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dd58e54bd277b= 90d847be09ae4b18bfdbc0dc2066 commit d58e54bd277b90d847be09ae4b18bfdbc0dc2066 Author: Tom Tromey Date: Wed Aug 4 12:44:10 2021 -0600 Fix two regressions caused by CU / TU merging PR symtab/28160 and PR symtab/27893 concern GDB crashes in the test suite when using the "fission" target board. They are both caused by the patches that merge the list of CUs with the list of TUs (and to a lesser degree by the patches to share DWARF data across objfiles), and the underlying issue is the same: it turns out that reading a DWO can cause new type units to be created. This means that the list of dwarf2_per_cu_data objects depends on precisely which CUs have been expanded. However, because the type units can be created while expanding a CU means that the vector of CUs can expand while it is being iterated over -- a classic mistake. Also, because a TU can be added later, it means the resize_symtabs approach is incorrect. This patch fixes resize_symtabs by removing it, and having set_symtab resize the vector on demand. It fixes the iteration problem by introducing a safe (index-based) iterator and changing the relevant spots to use it. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28160 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D27893 --=20 You are receiving this mail because: You are on the CC list for the bug.=