From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61000: emacs-28.2 hangs on displaying ill-formed python source Date: Sun, 22 Jan 2023 12:53:09 +0200 Message-ID: <83v8kykfhm.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21620"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61000@debbugs.gnu.org To: Yoichi Nakayama Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 22 11:54:35 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJXzf-0005QY-4G for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Jan 2023 11:54:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJXzE-0001z6-88; Sun, 22 Jan 2023 05:54:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJXz8-0001yp-Ir for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 05:54:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJXz8-00036Q-At for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 05:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJXz7-0001gW-OO for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 05:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Jan 2023 10:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61000 X-GNU-PR-Package: emacs Original-Received: via spool by 61000-submit@debbugs.gnu.org id=B61000.16743847906417 (code B ref 61000); Sun, 22 Jan 2023 10:54:01 +0000 Original-Received: (at 61000) by debbugs.gnu.org; 22 Jan 2023 10:53:10 +0000 Original-Received: from localhost ([127.0.0.1]:50773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJXyH-0001fQ-TF for submit@debbugs.gnu.org; Sun, 22 Jan 2023 05:53:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJXyH-0001fF-12 for 61000@debbugs.gnu.org; Sun, 22 Jan 2023 05:53:09 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJXyB-0002wl-L2; Sun, 22 Jan 2023 05:53:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=T7r477PxEuQZOqvqJ/4vWZHITX6FmFCjbQoN0KY+A9I=; b=sW68FX8sVWRU Kxyh69M4+cipm0nnl/aRkkS66bHyXbsSJMpEUhOJoB2KwfOuKI0XCtbPovB/dJjjZX1QTu95w62Rs H6GXbIzsyZ0frDcNpk0qPdYt8b8sOWMHUpMWT+UYjRHKMilVhsgxFhymS82YRPh4ATOYMZhWiqavd NRFtuPp5il51RijAMBHoQhFbdaT0GYdE0D5xsxj3sJ/AXKHChhhEefhKHU2335A/qJz3Nok6DFnvS ve+bGuAhX6oushSqu/KY0aIoAn3jzQpOvOBvXO4i+UuKdvkH0M7UEAT5O0KU7d+u8YuSUApyQfPnT B6QyzpwEvCVvRLDezIlaVg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJXyB-0003p5-45; Sun, 22 Jan 2023 05:53:03 -0500 In-Reply-To: (message from Yoichi Nakayama on Sun, 22 Jan 2023 16:21:02 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253924 Archived-At: > From: Yoichi Nakayama > 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 > > 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.