From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 20B743858C33; Mon, 30 Oct 2023 16:38:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20B743858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698683924; bh=v/8FEiAmPKaAGPrLHoy26nEQLIG3eCcH4QNjUohJOHM=; h=From:To:Subject:Date:From; b=OihXRwQmgqe72CPjtqdoHg6hgX8CpWYU7vWlxPsA2NNqDTszVnRQg0xqaqlyGl7rK MJXFO+fM/CLBarreSuyeZhU1YoiYrfvGC7RSNZwnzEt3mlDFnP48EeJOeMWJV8FOtw T4Dwd2lQGXV3pXeD8VGIL+x4U7m91jJ6DaxuFPV0= From: "josh.cottingham at linaro dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: josh.cottingham at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31010 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 wh= ole 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 bui= ld 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=20 [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=3D1, argv=3D0x7fffffffd578) 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". --=20 You are receiving this mail because: You are on the CC list for the bug.=