X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-CMAE-Analysis: v=2.4 cv=JMH+D+Gb c=1 sm=1 tr=0 ts=6018e43c a=+cj0cO56Fp8x7EdhTra87A==:117 a=LNLvqy7ExQMSXSyN+YKITA==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=qa6Q16uM49sA:10 a=zNEK5aTOAX9XNbHzNqAA:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: glimrick AT epilitimus DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=epilitimus.com; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/eXnK1WyT+Xww/86wYuHtO5meO7lEdQl/EIziS/lkoE=; b=hQimMuFthgp+zdOO/8Ek2voK6Q 9ZV/Dd1/xNRhU/k71bjNx1geU9LnL2vmrBBxQ+XA/FG5wBNvM3JT36qd6H1xG7n7OZW0MyaAwF8Uq QDixd9eeHdSnTndJuQfTA+SzLeYkNbZ/+fBjuNQWo8tZuz4oqXbt8qNKG8mNrZz8ypNramXrmZYPN HRCBqGCRIKIUBmM+OF94jF589aZMhIgFrw8JA0iOj1MGbPIYB14cL9jCxYHf7stOZMjr1COQr7Uv3 eBBVV3GqDvIlosMbiXTFj3r2yTaLLYqHM6EASf85duBgjJH+sKpCYLmHVimPPTuKJewYI1o8KH7FF C9P37fUg==; To: geda-user ailing list From: "Glenn (glimrick AT epilitimus DOT com) [via geda-user AT delorie DOT com]" Subject: [geda-user] recursive subsheet issue Message-ID: Date: Mon, 1 Feb 2021 21:33:46 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2plcpnl0121.prod.iad2.secureserver.net X-AntiAbuse: Original Domain - delorie.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - epilitimus.com X-Get-Message-Sender-Via: a2plcpnl0121.prod.iad2.secureserver.net: authenticated_id: glimrick AT epilitimus DOT com X-Authenticated-Sender: a2plcpnl0121.prod.iad2.secureserver.net: glimrick AT epilitimus DOT com X-Source: X-Source-Args: X-Source-Dir: X-CMAE-Envelope: MS4xfOv3od4NkNVeBkVLIaN24ojnXBYkWImVNwQXqJ3G4UlIEFWyoQ2QsqlBR2gFyJ48ihJH/BRBBokTWao9fo7GLsYI9FqsUS72fJzFkkZuJNp6+tlZ8P9P dV+WN+lASSsVzydRa9BMJ+BxswNb5SmJT8lq3LPw57Hg72/EV4nygejHtqj1szGn1l6wN1ZCDduLxY9P8N1d1rwR4SEt9txYu/pddzgPzP6DxyI71EaPVZ2x Reply-To: geda-user AT delorie DOT com Roland, I came across what I think is a potential bug in gaf/netlist/netlist.py lines 256-275. If traverse-hierarchy is true and a subsheet sheet has as a subsheet a sheet from higher up in the hierarchy there is no check to prevent run away recursion. For example: Sheet A has as a subsheet Sheet B Sheet B has as a subsheet Sheet C Sheet C has as a subsheet Sheet A A loads B loads C loads A loads B ... No idea why this would ever be done, except by mistake. possible solutions: - traverse back up the hierarchy to see if the file is mentioned. - have a level count and a recursion limit config variable. - keep a list of all sheets traversed so far up to the current sheet and check it. I can think of no reason recursion would be a good idea in this situation. Actually I see no reason why it wouldn't happen with a self referencing sheet: A -> A -> A ... Also it doesn't actually load the sheet each time as that is done earlier (which actually does prevent recursion at that point, see gaf.netlist.netlist.load_schematic), but it does consume memory by creating a new sheet for the subsheet, and if encountered processing would hang until you ran out of memory. Or am I missing something? If not let me know and I write a fix. I came across it because I am trying to figure out a way to extract the hierarchy from the netlist. Glenn