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/31010] Evaluating "mixed-cased" fundamental types causes hangs/OOM due to full symtab expansion
Date: Sat, 08 Mar 2025 00:15:39 +0000	[thread overview]
Message-ID: <bug-31010-4717-jwhVurstkR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31010-4717@http.sourceware.org/bugzilla/>

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

--- Comment #9 from Sourceware Commits <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=aab2ac34d7f78f0b7a42cef0187dc6e4d7ec4f02

commit aab2ac34d7f78f0b7a42cef0187dc6e4d7ec4f02
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Feb 21 09:18:28 2025 -0700

    Avoid excessive CU expansion on failed matches

    PR symtab/31010 points out that something like "ptype INT" will expand
    all CUs in a typical program.  The OP further points out that the
    original patch for PR symtab/30520:

        https://sourceware.org/pipermail/gdb-patches/2024-January/205924.html

    ... did solve the problem, but the patch changed after (my) review and
    reintroduced the bug.

    In cooked_index_functions::expand_symtabs_matching, the final
    component of a split name is compared with the entry's name using the
    usual method of calling get_symbol_name_matcher.

    This code iterates over languages and tries to split the original name
    according to each style.  But, the Ada splitter uses the decoded name
    -- "int".  This causes every C or C++ CU to be expanded.

    Clearly this is wrong.  And, it seems to me that looping over
    languages and trying to guess the splitting style for the input text
    is probably bad.  However, fixing the problem is not so easy (again
    due to Ada).  I've filed a follow-up bug, PR symtab/32733, for this.

    Meanwhile, this patch changes the code to be closer to the
    originally-submitted patch.  This works because the comparison is now
    done between the full name and the "lookup_name_without_params"
    object, which is a less adulterated variant of the original input.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31010
    Tested-By: Simon Marchi <simon.marchi@efficios.com>

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

  parent reply	other threads:[~2025-03-08  0:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 16:38 [Bug symtab/31010] New: " josh.cottingham at linaro dot org
2023-10-30 16:40 ` [Bug symtab/31010] " josh.cottingham at linaro dot org
2023-10-31  4:14 ` sam at gentoo dot org
2023-10-31 17:30 ` tromey at sourceware dot org
2023-11-30 17:15 ` tromey at sourceware dot org
2024-01-20  8:36 ` sam at gentoo dot org
2024-02-15 17:02 ` tromey at sourceware dot org
2025-02-04 15:38 ` josh.cottingham at linaro dot org
2025-02-05 10:15 ` josh.cottingham at linaro dot org
2025-02-20 22:23 ` tromey at sourceware dot org
2025-02-20 22:24 ` tromey at sourceware dot org
2025-02-21 16:27 ` tromey at sourceware dot org
2025-02-21 16:34 ` tromey at sourceware dot org
2025-02-22  0:40 ` tromey at sourceware dot org
2025-02-22 18:51 ` tromey at sourceware dot org
2025-03-08  0:15 ` cvs-commit at gcc dot gnu.org [this message]
2025-03-08  0:19 ` tromey at sourceware dot org
2025-03-08 18:18 ` sam at gentoo 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-31010-4717-jwhVurstkR@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).