[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: |
Wed, 14 Sep 2022 21:18:33 +0300 |
> Cc: 57804@debbugs.gnu.org, Paul Pogonyshev <pogonyshev@gmail.com>
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 14 Sep 2022 19:52:45 +0200
>
> So I think there's scope for us to do something practical here with this
> annoying problem. It's hard enough to develop font locking code without
> Emacs suddenly (and unbreakably) hanging on you when you've typed in
> some buggy code.
Just run your development version under a debugger, and you will
always be able to interrupt any loop, anywhere.
And I think you greatly underestimate the conceptual difficulty here.
Your conclusions are specific to this toy program. But in real-life
use cases, it is entirely unclear how to handle this:
. the fact that redisplay is called several times in a row doesn't
necessarily mean we have a bug, there are packages out there which
cause that due to stuff they do in various hooks (like linum.el,
which moves overlays etc.)
. the buggy code could be in some function registered with jit-lock
or run from some hook invoked by redisplay that have nothing to do
with font-lock, in which case turning off font-lock will not solve
anything
IOW, the general solution to this is not apparent, and I'm not sure it
exists, the only solution I'm aware of is to run unstable code under a
debugger.
- bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, (continued)
- bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Paul Pogonyshev, 2022/09/14
- bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Eli Zaretskii, 2022/09/14
- bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Lars Ingebrigtsen, 2022/09/14
- bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Eli Zaretskii, 2022/09/14
- bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Ihor Radchenko, 2022/09/14
- bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Gregory Heytings, 2022/09/14
bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, dick, 2022/09/14
bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, dick, 2022/09/14
bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Eli Zaretskii, 2022/09/14
bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Po Lu, 2022/09/15
bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely, Eli Zaretskii, 2022/09/15