unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 51577@debbugs.gnu.org
Subject: bug#51577: 27.2; Regression: reproducible hang with face functions
Date: Thu, 04 Nov 2021 21:01:59 +0200	[thread overview]
Message-ID: <83y263eod4.fsf@gnu.org> (raw)
In-Reply-To: <87bl2zss78.fsf_-_@gnus.org> (message from Lars Ingebrigtsen on Thu, 04 Nov 2021 19:15:23 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Drew Adams <drew.adams@oracle.com>,  51577@debbugs.gnu.org
> Date: Thu, 04 Nov 2021 19:15:23 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > 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?
> 
> We do try to detect loops in other situations (to avoid hangs).  This is
> in redisplay code, though (I think?), so perhaps it would be
> prohibitively expensive to try to detect loops here?

First, since this is triggered by redisplay, any errors must be
"silent": we log an error message in *Messages* and otherwise silently
do nothing.  Which in this case would mean the problematic face will
not be applied.  Not sure this is better than inflooping.

As for detecting loops: it could be tricky.  It is easy enough to
detect simple loops such as the one in this case, where a face
inherits directly from itself, and the value of the :inherit attribute
is the symbol of a face.  But inheritance loops could be less simple:
a face could inherit from itself indirectly, and the value of the
attribute could be a list, not a named face.  Detecting loops in those
cases would require recording face specs/names we already saw in some
list, and each time we get an :inherit attribute, check if its value
is already in the list.  Is that worth our while, if the result will
be a silent error message in *Messages*?





  parent reply	other threads:[~2021-11-04 19:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  2:44 bug#51577: 27.2; Regression: reproducible hang with face functions Drew Adams
2021-11-03 17:10 ` Eli Zaretskii
2021-11-03 18:58   ` bug#51577: [External] : " Drew Adams
2021-11-03 19:43     ` Eli Zaretskii
2021-11-04 18:15       ` Lars Ingebrigtsen
2021-11-04 18:48         ` martin rudalics
2021-11-04 18:50           ` Lars Ingebrigtsen
2021-11-04 19:32           ` Eli Zaretskii
2021-11-04 19:01         ` Eli Zaretskii [this message]
2021-11-04 19:21           ` bug#51577: [External] : " Drew Adams
2021-11-04 22:56           ` Lars Ingebrigtsen
2021-11-05  2:41             ` bug#51577: [External] : " Drew Adams
2021-11-05  7:32               ` Eli Zaretskii
2021-11-05  7:19             ` Eli Zaretskii
2021-11-05 13:24               ` Lars Ingebrigtsen
2021-11-05 14:22                 ` Eli Zaretskii
2021-11-06  0:39                   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y263eod4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=51577@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).