unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yoichi Nakayama <yoichi.nakayama@gmail.com>
Cc: 61000@debbugs.gnu.org
Subject: bug#61000: emacs-28.2 hangs on displaying ill-formed python source
Date: Sun, 22 Jan 2023 12:53:09 +0200	[thread overview]
Message-ID: <83v8kykfhm.fsf@gnu.org> (raw)
In-Reply-To: <CAF5D8-uKN412jm8Oc+CUC2p_sLPq-9Y2HTT1EMT2W73gCV15qg@mail.gmail.com> (message from Yoichi Nakayama on Sun, 22 Jan 2023 16:21:02 +0900)

> From: Yoichi Nakayama <yoichi.nakayama@gmail.com>
> Date: Sun, 22 Jan 2023 16:21:02 +0900
> 
> Hi,
> I found Emacs-28.2 becomes inoperable (hangs at 100% CPU usage)
> when displaying certain ill-formed Python source code.
> 
> How to reproduce:
> (1) prepare python source file
> https://raw.githubusercontent.com/sqlfluff/sqlfluff/6071b70ef6a46b19141495ee8d38b41b27750b2c/src/sqlfluff/dialects/dialect_snowflake.py
> (2) open it by "emacs -Q dialect_snowflake.py"
> (3) jump to line 767 by "M-g g 767 RET".
> (4) remove closing triple quotes by "C-k"
> 
> class FunctionNameSegment(ansi.FunctionNameSegment):
>     """Function name, including any prefix bits, e.g. project or schema.
>     Overriding FunctionNameSegment to support Snowflake's IDENTIFIER
> pseudo-function.
>     """ <== remove this triple quote
> 
> 
> I also verified the following:
> * The problem doesn't occur with Emacs-28.1
> * The problem doesn't occur when I load lisp/progmode/python.el
> before 1b77362 between step (2) and (3).
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1b7736277114bf91012b817a4e2557625b7340a5
> 
> > commit 1b7736277114bf91012b817a4e2557625b7340a5
> > Author: Lars Ingebrigtsen <larsi@gnus.org>
> > Date:   Mon Apr 18 13:17:32 2022 +0200
> >
> >     Avoid hangs in python-mode with debug-on-error set
> >
> >     * lisp/progmodes/python.el (python-nav-end-of-statement): Avoid
> >     using cl-assert here, because this is called from the font-lock
> >     machinery, and if debug-on-error is set here, we'll hang Emacs
> >     (bug#54996).
> >
> >     Do not merge to master.

Thanks, I can reproduce this in Emacs 28.2, but not on what will be
soon Emacs 29.1.  So I guess the fact that we didn't merge the above
"fix" to master avoids the problem in Emacs 29.

So I think this problem is limited to Emacs 28.2, and we don't have to
do anything about it, since we don't plan any additional releases from
the macs-28 branch.

Thanks.





  reply	other threads:[~2023-01-22 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22  7:21 bug#61000: emacs-28.2 hangs on displaying ill-formed python source Yoichi Nakayama
2023-01-22 10:53 ` Eli Zaretskii [this message]
2023-01-26  8:04   ` Eli Zaretskii

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=83v8kykfhm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61000@debbugs.gnu.org \
    --cc=yoichi.nakayama@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 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).