public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/27893] [fission] segfault in dw2_expand_symtabs_matching_one
Date: Wed, 08 Sep 2021 21:04:52 +0000	[thread overview]
Message-ID: <bug-27893-4717-BC9ErEtE3Z@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27893-4717@http.sourceware.org/bugzilla/>

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

--- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The gdb-11-branch branch has been updated by Tom Tromey
<tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=de2143d60b9928fa19af00fe3dbb0c8b79b1237b

commit de2143d60b9928fa19af00fe3dbb0c8b79b1237b
Author: Tom Tromey <tom@tromey.com>
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=28160
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27893

    (cherry picked from commit d58e54bd277b90d847be09ae4b18bfdbc0dc2066)

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

      parent reply	other threads:[~2021-09-08 21:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 19:57 [Bug symtab/27893] New: " vries at gcc dot gnu.org
2021-05-20 23:03 ` [Bug symtab/27893] " vries at gcc dot gnu.org
2021-05-20 23:06 ` vries at gcc dot gnu.org
2021-05-20 23:29 ` vries at gcc dot gnu.org
2021-05-21  0:14 ` vries at gcc dot gnu.org
2021-05-21  0:45 ` vries at gcc dot gnu.org
2021-05-21  1:10 ` vries at gcc dot gnu.org
2021-07-30 20:10 ` tromey at sourceware dot org
2021-08-03 23:20 ` tromey at sourceware dot org
2021-08-15 19:38 ` tromey at sourceware dot org
2021-08-24 12:13 ` vries at gcc dot gnu.org
2021-08-24 14:03 ` cvs-commit at gcc dot gnu.org
2021-08-24 14:34 ` tromey at sourceware dot org
2021-09-08 21:04 ` cvs-commit at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27893-4717-BC9ErEtE3Z@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).