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 ada/25837] [cc-with-debug-names] gdb.ada/big_packed_array segv
Date: Thu, 23 Apr 2020 13:22:45 +0000	[thread overview]
Message-ID: <bug-25837-4717-Smw3118BJ2@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25837-4717@http.sourceware.org/bugzilla/>

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

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

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

commit ecc6c6066b5cdd4663413e0bd6ef8deea1a8c889
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Apr 23 07:19:43 2020 -0600

    Fix Ada crash with .debug_names

    PR ada/25837 points out a crash in the gdb testsuite when .debug_names
    is used.  You can reproduce like:

        runtest --target_board=cc-with-debug-names \
            gdb.ada/big_packed_array.exp

    The bug was introduced by commit e0802d599 ("Avoid copying in
    lookup_name_info").  The problem is that the return type of
    language_lookup_name changed, but in a way that didn't cause existing
    callers to trigger a compilation error.  Previously, it returned a
    "const string &", but after it returned a "const char *".  This caused
    a string to be created in dw2_expand_symtabs_matching_symbol, but one
    that had too short of a lifetime; so eventually the matcher cache
    would wind up with invalid data.

    This patch fixes the problem by updating the callers to use the new
    type.

    Tested on x86-64 Fedora 30.

    gdb/ChangeLog
    2020-04-23  Tom Tromey  <tromey@adacore.com>

            PR ada/25837:
            * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
            "const char *", not a "const std::string &".
            <name_and_matcher::operator==>: Update.
            * unittests/lookup_name_info-selftests.c: Change type of
            "result".

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

  parent reply	other threads:[~2020-04-23 13:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 14:26 [Bug ada/25837] New: " vries at gcc dot gnu.org
2020-04-17  6:50 ` [Bug ada/25837] " vries at gcc dot gnu.org
2020-04-17 20:13 ` tromey at sourceware dot org
2020-04-17 20:14 ` tromey at sourceware dot org
2020-04-17 20:16 ` tromey at sourceware dot org
2020-04-17 20:26 ` tromey at sourceware dot org
2020-04-17 21:11 ` tromey at sourceware dot org
2020-04-17 22:38 ` brobecker at gnat dot com
2020-04-21 15:15 ` tromey at sourceware dot org
2020-04-21 18:51 ` vries at gcc dot gnu.org
2020-04-23 13:22 ` cvs-commit at gcc dot gnu.org [this message]
2020-04-23 13:26 ` tromey at sourceware dot org

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-25837-4717-Smw3118BJ2@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).