From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 873853858D35; Mon, 28 Aug 2023 04:24:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 873853858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693196649; bh=svKOnjIYT0FopE7RiHj47KdpqDHhgj3AnLK4Ub+0r2E=; h=From:To:Subject:Date:From; b=NxT8RKMJR06pGZiO0VRcdRHirj/jLZSjXeHgJKsK5LKG5wqEVqmAPcRyhOR1NnE4X afK2h1gzFMaJdqKL4kVPku/5RDmwC0i2ztQBMKxuUNRPihkjRdapJtsRP/kRwDhVNm JNb1ToBca42d2gw28VSO+09qcafBt+Gu0yrSdseI= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30799] New: [gdb/symtab] hang in inherit_abstract_dies Date: Mon, 28 Aug 2023 04:24:08 +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: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D30799 Bug ID: 30799 Summary: [gdb/symtab] hang in inherit_abstract_dies Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I build gdb with gcc 7.5.0 and -O2 -flto -flto-partition=3Done, and ran into timeouts in gdb.gdb/*.exp. The hang seems to be related to a self-referencing DIE: ... <2><91dace>: Abbrev Number: 405 (DW_TAG_label) <91dad0> DW_AT_abstract_origin: <0x91dace> ... We're stuck in this loop in inherit_abstract_dies: ... /* For each CHILD_DIE, find the corresponding child of=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ORIGIN_DIE. If there is more than one layer of=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 DW_AT_abstract_origin, follow them all; there shouldn't be,=20=20= =20=20=20=20=20=20=20=20=20=20 but GCC versions at least through 4.4 generate this (GCC PR=20=20= =20=20=20=20=20=20=20=20=20=20 40573). */ die_info *child_origin_die =3D child_die; dwarf2_cu *child_origin_cu =3D cu; while (true) { attr =3D dwarf2_attr (child_origin_die, DW_AT_abstract_origin, child_origin_cu); if (attr =3D=3D nullptr) break; child_origin_die =3D follow_die_ref (child_origin_die, attr, &child_origin_cu); } ... --=20 You are receiving this mail because: You are on the CC list for the bug.=