bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57804: An infinite loop in a `fontify-region' function causes Emacs


From: Eli Zaretskii
Subject: bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely
Date: Thu, 15 Sep 2022 09:27:14 +0300

> From: Po Lu <luangruo@yahoo.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  57804@debbugs.gnu.org,  Paul Pogonyshev
>  <pogonyshev@gmail.com>
> Date: Thu, 15 Sep 2022 13:20:51 +0800
> 
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> >> This case is exactly one of those which I think we shouldn't try to
> >> fix, because it's the case of "buggy Lisp program", a.k.a. "don't do
> >> that".  There's no reason for any useful Lisp program to have an
> >> infloop like this:
> >>
> >>>   (while t
> >>>     "whoopsie")
> >
> > You've never accidentally put an infloop into a font locking function?
> > Then you've been very lucky.
> >
> > We should definitely fix this is we can.
> 
> Why isn't jit-lock-debug-mode an option?

It definitely is, for the particular use case of debugging font-lock.

So is running font-lock-fontify-buffer by hand.

So is attaching a debugger when such an infloop is bumped into
accidentally without expecting it.

There's also the recently-added backtrace-on-redisplay-error feature,
which could help with diagnosing such problems, perhaps combined with
debug-on-entry or somesuch.

IOW, I think we have already several useful tools available for the
particular problem of debugging loops in font-lock, if we want to
interpret this bug report in that narrow interpretation.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]