From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta035.useast.a.cloudfilter.net (omta035.useast.a.cloudfilter.net [44.202.169.34]) by sourceware.org (Postfix) with ESMTPS id 5800E3858D33 for ; Wed, 16 Aug 2023 18:51:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5800E3858D33 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-5002a.ext.cloudfilter.net ([10.0.29.215]) by cmsmtp with ESMTP id WJz6q8jc7DKaKWLc4qcpX1; Wed, 16 Aug 2023 18:51:24 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id WLc3qQg7bqpuuWLc4qD5jh; Wed, 16 Aug 2023 18:51:24 +0000 X-Authority-Analysis: v=2.4 cv=XOgj9CtE c=1 sm=1 tr=0 ts=64dd1aac 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=jwVIv_hhVFu0yPW4AZkA: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=TimNDeASPrfFicAYn5VdroI5ENXZxY/ZknNWnSFLdaM=; b=wOpnRU6uNL8cfjQ5lsST2YF+wu jXfticFOyeBXgCgUqNX1vuyzZmNxutwdu12vvS73xjcaHYRTB8sEVy3N4CY4qqAmCAV7s3eK6zKeT LWbVnMPn07RfKIZb2Rszob9uK; Received: from 75-166-142-177.hlrn.qwest.net ([75.166.142.177]:43124 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 1qWLc3-002tAr-1K; Wed, 16 Aug 2023 12:51:23 -0600 From: Tom Tromey To: Tom de Vries via Gdb-patches Cc: Tom de Vries Subject: Re: [PATCH] [gdb/symtab] Handle self-reference DIE References: <20230816125602.23696-1-tdevries@suse.de> X-Attribution: Tom Date: Wed, 16 Aug 2023 12:51:22 -0600 In-Reply-To: <20230816125602.23696-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Wed, 16 Aug 2023 14:56:02 +0200") Message-ID: <87o7j6yg5x.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.142.177 X-Source-L: No X-Exim-ID: 1qWLc3-002tAr-1K X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-142-177.hlrn.qwest.net (murgatroyd) [75.166.142.177]:43124 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfK30GLp8gG1U0rx915RefKm1ie+5KcSnFuwT3Sodd5VBlSSkV4hOzrw9Ga+y4RkEY//96ZbHny5r2iyGTcpe7c0wwzgd14/+PrhU0wxlgdjU13U7gUDO ajkI8/fYB8SoR6EhZIGmGUIPfILj8yTo9W77qlQcmzhO71aJdChhyNuUI+GRzL/+z1M1TDdPraINd6XA0CsCRpX7PCNiit+WM4A= X-Spam-Status: No, score=-3019.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham 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 de Vries via Gdb-patches writes: > Fix this by inhibiting the scan_attributes self-recursion for self-references. Makes sense, thanks. Approved-By: Tom Tromey > Note that this doesn't fix the same problems for the more complicated case of: > ... > <1>: Abbrev Number: 3 (DW_TAG_class_type) > DW_AT_name : c1 > DW_AT_specification: <0xc6> > <1>: Abbrev Number: 4 (DW_TAG_class_type) > DW_AT_name : c2 > DW_AT_specification: <0xbe> > ... > but the approach for deciding whether to fix pathological dwarf cases is as > per PR27981 comment 3: > ... > yes if it is cheap/obvious, and no if it is something complicated or expensive. > ... > and at this point I'm not sure whether fixing this will fall in the first > category. I suspect full recursion detection would be too expensive. However, one idea would be to limit the number of specifications that would be followed. A small limit like 4 or 5 is probably more than enough for all actually-existing DWARF. I filed a dwarflint bug for this: https://sourceware.org/bugzilla/show_bug.cgi?id=30772 Tom