all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alex Holehouse <alex.holehouse@gmail.com>
Cc: 58752-done@debbugs.gnu.org
Subject: bug#58752: jit-lock-function infinite loop?
Date: Thu, 27 Oct 2022 19:17:47 +0300	[thread overview]
Message-ID: <83o7txkzpw.fsf@gnu.org> (raw)
In-Reply-To: <CAOoZ-VioDKp7XNwh0KpztfH1cd_pSBw4rbew1J=MNbGQ3=OQCA@mail.gmail.com> (message from Alex Holehouse on Sun, 23 Oct 2022 18:37:37 -0500)

> From: Alex Holehouse <alex.holehouse@gmail.com>
> Date: Sun, 23 Oct 2022 18:37:37 -0500
> 
> Apologies if this is a reported and known issue, but after several hours of tracking this down, I think I've found
> a bug in the font-lock module when working with Python code on Emacs28 (macOS 12.6 on Apple Silicon
> (M1)). This is an issue certainly in Emacs 28 but not in earlier versions, so my temporary fix here is just to
> revert back to emacs 26; I haven't tested 27.
> 
> I think the issue stems from inside the jit-lock-function in font-lock.el, although my experience in hunting down
> emacs issues is limited. 
> 
> Specifically, it seems that the function falls into an infinite loop when trying to format ill-behaving Python code.
> The issue arises when a specific combination of things are true: an un-closed docstring that opens with three
> double quotes (but does not close) followed by docstrings in other functions with 4 or more examples of single
> quotation marks that are unsatisfied. These unsatisfied single quotation marks are, of course, allowed inside a
> docstring, which means even when editing a Python file, if the unclosed triple double-quote docstring appears
> event temporarily (e.g. as you're writing the docstring) the entire program freezes. 
> 
> I've narrowed this down to a minimal example that, at least in my setup (nothing fancy, vanilla emacs from
> both emacsformacosx and from homebrew), reproduces the issue. The code snippet can be found here:
> https://gist.github.com/alexholehouse/2259580ed2cb2caf75a16ee31d927465 
> 
> If you open this file in emacs, the code renders but if you scroll down emacs freezes, but can be unfrozen by
> running kill -SIGUSR2 <emacs PID> from another terminal window.

Thank you very much for your efforts to provide a minimal example.

I can reproduce this bug in Emacs 28, but not in Emacs 29.  So I think
the underlying bug was already fixed, and I'm therefore closing this
bug.





      reply	other threads:[~2022-10-27 16:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 23:37 bug#58752: jit-lock-function infinite loop? Alex Holehouse
2022-10-27 16:17 ` Eli Zaretskii [this message]

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

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

  git send-email \
    --in-reply-to=83o7txkzpw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58752-done@debbugs.gnu.org \
    --cc=alex.holehouse@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.