From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta37.uswest2.a.cloudfilter.net (omta37.uswest2.a.cloudfilter.net [35.89.44.36]) by sourceware.org (Postfix) with ESMTPS id 8B4F33858D35 for ; Mon, 28 Aug 2023 14:11:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B4F33858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from eig-obgw-5001a.ext.cloudfilter.net ([10.0.29.139]) by cmsmtp with ESMTP id aauZqKlnDQFHRacxNqQcLi; Mon, 28 Aug 2023 14:11:06 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id acxMqgfAMgfmkacxNq86Mj; Mon, 28 Aug 2023 14:11:05 +0000 X-Authority-Analysis: v=2.4 cv=e/wV9Il/ c=1 sm=1 tr=0 ts=64ecaaf9 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=UttIx32zK-AA:10 a=Qbun_eYptAEA:10 a=CCpqsmhAAAAA:8 a=zstS-IiYAAAA:8 a=5HInp6qb94hJAL0Pv1MA:9 a=ul9cdbp4aOFLsgKbc677:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=M4Nqq9GTNpPPQkiBqt5srPT6FptzC6ixmQh+ZFE3OEM=; b=g74OUiXIMNB0gIPXUqlVz/fcJq yYFcvwMnCRA9qiwcKXl3yHdoalrj2mdPWzkY6tNWVciHvgntJ0Wi/nMou4R09kB7N1YE5LwY/asbk GWz8jhlNWPBuFh3EdD4ihnJpu; Received: from 75-166-150-212.hlrn.qwest.net ([75.166.150.212]:57464 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qacxM-00244h-1Q; Mon, 28 Aug 2023 08:11:04 -0600 From: Tom Tromey To: Tom de Vries via Gdb-patches Cc: Tom de Vries Subject: Re: [PATCH] [gdb/symtab] Handle self-reference in inherit_abstract_dies References: <20230828063633.3590-1-tdevries@suse.de> X-Attribution: Tom Date: Mon, 28 Aug 2023 08:11:03 -0600 In-Reply-To: <20230828063633.3590-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Mon, 28 Aug 2023 08:36:33 +0200") Message-ID: <875y4zuuiw.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.150.212 X-Source-L: No X-Exim-ID: 1qacxM-00244h-1Q X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-150-212.hlrn.qwest.net (murgatroyd) [75.166.150.212]:57464 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfEc6Crl1OcLaPvpNT/sESPkHtnfUKK68ekS6Iqy5X6QwiEXjPCtXYsrdEGbG6oxNkfeTIcb0INKBW1S7ehuwX4ABy/1KnjMrII99xBQj/2qnZmaXR2Tz SSjS6o1fgr8+KAHej/2lMC5DxQpiJzuJQfrPmuoxeOyLBslJQZ1Yc9pcPJsKeiJjxq2f6o3r8wuxREjYpH2ISjoeEPANBbMDQ10= X-Spam-Status: No, score=-3018.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Tom" == Tom de Vries via Gdb-patches writes: Tom> Building gdb with gcc 7.5.0 and -flto -O2 -flto-partition=one generates a Tom> self-referencing DIE: Tom> ... Tom> <2><91dace>: Abbrev Number: 405 (DW_TAG_label) Tom> <91dad0> DW_AT_abstract_origin: <0x91dace> Tom> ... Tom> When encountering the self-reference DIE in inherit_abstract_dies we loop Tom> following the abstract origin, effectively hanging gdb. Tom> Fix this by handling self-referencing DIEs in the loop in Tom> inherit_abstract_dies. I wonder if these have ever happened from compiler bugs, or only from hand-made tests. Anyway, seems fine. If we're ever worried about chains of inheritance that form loops, we can do some kind of tortoise/hare thing. Approved-By: Tom Tromey Tom