From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB4813858425; Mon, 4 Sep 2023 11:41:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB4813858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693827690; bh=n6R/Azo6Gqi/pacOEpTu+135Re0cGGcxD4FOhDwhzwM=; h=From:To:Subject:Date:From; b=HJIV3jo62BZwp1te9SoL5C+gXljDBmFYNt9J+nWvPEMqCTWk8gr0lQ4/AKoL6Mg9r P3/X83t4KMk4CORqix9ujRTRHPUiStSOVdDC9yE2cAhzkDRZVS4daqs9W5XtC2TqX7 ypaGfv8l4PQLfm/g8WgT3O63spGxJDoKTtUoRFEg= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30822] New: [gdb/symtab] Handle cyclic DIE references Date: Mon, 04 Sep 2023 11:41:30 +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=3D30822 Bug ID: 30822 Summary: [gdb/symtab] Handle cyclic DIE references 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: --- There are a few fixes in place in gdb/dwarf2/read.c that deal with self-referencing DIEs: ... $ grep -i self-ref gdb/dwarf2/read.c /* Handle DIE with self-reference. */ /* Self-referential typedefs are, it seems, not allowed by the DWARF complaint (_("Self-referential DW_TAG_typedef " /* Self-reference, we're done. */ /* Self-reference, we're done. */ /* Self-reference, we're done. */ ... These prevent either a hang or running out of stack. The generic case of cyclic DIE references (for instance DIE A references DI= E B, DIE B references DIE A) hasn't been solved though. Tom Tromey mentioned using a tortoise/hare approach to detect the cycles he= re ( https://sourceware.org/pipermail/gdb-patches/2023-August/201921.html ). See https://en.wikipedia.org/wiki/Cycle_detection#Floyd's_tortoise_and_hare= . --=20 You are receiving this mail because: You are on the CC list for the bug.=