From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51577: [External] : Re: bug#51577: 27.2; Regression: reproducible hang with face functions Date: Wed, 03 Nov 2021 21:43:56 +0200 Message-ID: <83a6ilgh37.fsf@gnu.org> References: <83tugtgo6z.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5504"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51577@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 03 20:45:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miMCD-00018x-LQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Nov 2021 20:45:17 +0100 Original-Received: from localhost ([::1]:49940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miMCC-0005Zj-F9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Nov 2021 15:45:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMBy-0005ZY-A6 for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 15:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miMBy-0004NE-0Q for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 15:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1miMBx-0005rk-Ue for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 15:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Nov 2021 19:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51577 X-GNU-PR-Package: emacs Original-Received: via spool by 51577-submit@debbugs.gnu.org id=B51577.163596864522448 (code B ref 51577); Wed, 03 Nov 2021 19:45:01 +0000 Original-Received: (at 51577) by debbugs.gnu.org; 3 Nov 2021 19:44:05 +0000 Original-Received: from localhost ([127.0.0.1]:41339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miMB3-0005q0-KD for submit@debbugs.gnu.org; Wed, 03 Nov 2021 15:44:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miMB2-0005pQ-Qh for 51577@debbugs.gnu.org; Wed, 03 Nov 2021 15:44:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMAx-0003kc-3o; Wed, 03 Nov 2021 15:43:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9rnUt+SHQ3nGgEXAlitVyRQjI33+LxTXTB/XdnaFT4o=; b=HzaKm1YDOpak 8wvieNOB7r8jlUXOuGNybz14YLmMB0vwAtwFPseAoQEKI1oZmB+X7UmUW6C2H4FHqvxOdQst6NiDB wWNqHiGDwy1PDUVpt5iDPvLq8sHb1mgrrsiQx8KenJtGQYpSOzn3mHitZh8pOD5zA6wzbmWO3hocK whnh0IIK8c8H+ZzkLxh8CVrd4yFebEvI72qnJkq9t8cTDQ3X8ucRLo5FZYExInjIMiGLGr8If3nqJ aNUlOt2h/Nj41cEGkiIWbrR5ygy2imgCC20b/2BK7zDfN1wbZbZA3ShjVZeUsMo2SXoTF1le/8PTn 9J0B4s0AeQtRr6B3scSrEQ==; Original-Received: from [87.69.77.57] (port=3871 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMAw-000313-LW; Wed, 03 Nov 2021 15:43:58 -0400 In-Reply-To: (message from Drew Adams on Wed, 3 Nov 2021 18:58:23 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218895 Archived-At: > From: Drew Adams > CC: "51577@debbugs.gnu.org" <51577@debbugs.gnu.org> > Date: Wed, 3 Nov 2021 18:58:23 +0000 > > > You set the region face to inherit from itself, and you expect that to > > work without causing an infloop when Emacs tries to resolve some face > > attribute? > > Yes. I expected Emacs to act as it has in the past, > and ignore such an :inherit as a no-op. What happened in the past was the result of the implementation, not the design. The implementation changed (for valid reasons), so the undefined behavior your code invokes now gets you in trouble. > > If FACE1 has some attribute 'unspecified', but inherits > > from FACE2, Emacs will try to go up the inheritance chain to see if > > some of the parent faces specifies that attribute. If FACE1 inherits > > from itself, going up the inheritance chain will never end. > > Only if the implementation doesn't recognize the > inheritance loop. What would you expect it to do if it did? And how does your code differ from this: (while t nil) Or would you consider it a bug that Emacs doesn't detect the infinite while-loop, either? > > IOW, it's a cockpit error. > > You can look at it that way. But I'd expect that > inheritance of a face from itself would be a no-op. Why? > And that's exactly what the case was in Emacs 26. Yes, undefined behavior can do different things in different versions. > Why should the code now chase its tail down an > infinite rabbit hole? Is this really by design? The design is to chase the inheritance chain, yes. Why is it needed is a long story, and isn't really relevant for the issue at hand, as long as it isn't a bug or faulty design. Faces aren't supposed to inherit from themselves, period. > Not rhetorical questions. It seems like a design > change has been made, but with no announcement. The announcement _was_ made, but we announce features, not their designs.