public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "josh.cottingham at linaro dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/31010] New: Evaluating "mixed-cased" fundamental types causes hangs/OOM due to full symtab expansion
Date: Mon, 30 Oct 2023 16:38:43 +0000 [thread overview]
Message-ID: <bug-31010-4717@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=31010
Bug ID: 31010
Summary: Evaluating "mixed-cased" fundamental types causes
hangs/OOM due to full symtab expansion
Product: gdb
Version: 13.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: josh.cottingham at linaro dot org
Target Milestone: ---
Attempting to evaluate "mixed/uper-case" C/C++ fundamental types (such as
"output LONG" or "output Int") will cause GDB to try to fully expand the whole
symbol table. Depending on how large the binary we are debugging, this could
cause GDB to hang for several minutes and has been observed to cause
Out-of-Memory issues on some circumstances.
Via a git bisect, it was observed that this regression first occurs on the
commit which enables the new DWARF indexer:
https://sourceware.org/pipermail/gdb-patches/2022-April/187417.html
Easiest way to reproduce this issue is to attempt to run GDB on a debug build
of GDB:
$ gdb ./gdb/gdb
(gdb) start
Temporary breakpoint 1 at 0x410675: file gdb.c, line 28.
Starting program: /path/to/binutils-gdb/gdb/gdb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd578) at gdb.c:28
28 memset (&args, 0, sizeof args);
(gdb) output LONG
No symbol "LONG" in current context.
This will take ~20-30 seconds, though as stated above with larger binaries it
has been observed to take make longer or cause Out-of-Memory. Worth noting the
hang does not occur if we attempt to output other non-existent symbols such as
"output NOTREAL".
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2023-10-30 16:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 16:38 josh.cottingham at linaro dot org [this message]
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
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@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).