From unknown Sat Aug 09 09:38:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61000: emacs-28.2 hangs on displaying ill-formed python source Resent-From: Yoichi Nakayama Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Jan 2023 07:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61000 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 61000@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16743720828830 (code B ref -1); Sun, 22 Jan 2023 07:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jan 2023 07:21:22 +0000 Received: from localhost ([127.0.0.1]:50518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJUfJ-0002IL-Q3 for submit@debbugs.gnu.org; Sun, 22 Jan 2023 02:21:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:39792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJUfH-0002IE-VK for submit@debbugs.gnu.org; Sun, 22 Jan 2023 02:21:20 -0500 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 1pJUfG-0007NB-Gk for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 02:21:18 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJUfE-0002Cu-RO for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 02:21:18 -0500 Received: by mail-pl1-x631.google.com with SMTP id z13so8752923plg.6 for ; Sat, 21 Jan 2023 23:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ZGPYnS1xEuh7Noh5U9U/fgEtpbozzOZIok3rZUtOIvw=; b=YOMXA+ShTt6xH61yuXuVW7W61W+Oe1BWyYHQpwgQIRS7fOPoVBfxrdJjMJqR3n8EEv ab82xnFG/qqN7VZBVULHBCFkqYwEZNsVamsX7whvscN9q29CldQdj3ODooKSo1jvJ4K5 /9bhwjCK/4RAKmzhZU7wRSaDvnchMaq58BGNdn9Mfi6Eb/6PONrdMilFPD3gSETCs5Q4 92DNCbKBY31eJf7zoMMTEpTMGV4JZFyeFY//OUF9e08UOhn83WBF8nrnLJ5fQyI5gEHf W84End3i+m+vHaOFZLJWNwK65l4lRpHPBrys0XqTsip2WgZOUTqB3wFXfgwjnJgfvrSe lg7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZGPYnS1xEuh7Noh5U9U/fgEtpbozzOZIok3rZUtOIvw=; b=KaZMDi1lan66ZbaIi9+qnlnoZCJdfntSA3rhBxkpytLzGTP+QvgZsPbkbyElDtxWiN ixKhk7hNpleg3bxH8us+blfsOEpZWk6BOKkZHoj7R5K8Jz21waxTkDLegqL64VaX7cSq 8fJZAfjfD4x3eAsxVtRy2LDfqm49Q0Nms1MUcrGq3wRutGdMrfSwwXbSvlM5x+mQ0eh2 34+hTOiq3CMvDG+cuZuUseCE0msRQ/hzBfMbiITGbaYVHg7UfUg9Zq3kH/QTFnldu29Z 1TdfveVjDee0djxXSQgX78elFw+D5rEa6G/YJyecUCSFhsksT4pPN9WQb8E2mcM+UBUL weXw== X-Gm-Message-State: AFqh2kohqsPkivCl8uDhVdz0JMs1tBy/vuBUJ9eUlkzDq//CYFt6oBO3 fPflOHLlk4fueMO3RI///YamITf/erZLmSDKmZww0GMOhmg= X-Google-Smtp-Source: AMrXdXvIE5nzA6UT3+dt+SPYoZVrWkB6fwpoJfPV1LoeDAVXHxCHn0+84X/EDYjDqNq5mkGYTIhZjHyXUvNpLmHw7X8= X-Received: by 2002:a17:90a:e384:b0:22b:b217:e5ea with SMTP id b4-20020a17090ae38400b0022bb217e5eamr911284pjz.206.1674372073409; Sat, 21 Jan 2023 23:21:13 -0800 (PST) MIME-Version: 1.0 From: Yoichi Nakayama Date: Sun, 22 Jan 2023 16:21:02 +0900 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=yoichi.nakayama@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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, -- Yoichi NAKAYAMA From unknown Sat Aug 09 09:38:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61000: emacs-28.2 hangs on displaying ill-formed python source 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 X-GNU-PR-Keywords: To: Yoichi Nakayama Cc: 61000@debbugs.gnu.org Received: via spool by 61000-submit@debbugs.gnu.org id=B61000.16743847906417 (code B ref 61000); Sun, 22 Jan 2023 10:54:01 +0000 Received: (at 61000) by debbugs.gnu.org; 22 Jan 2023 10:53:10 +0000 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 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 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==; 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 Date: Sun, 22 Jan 2023 12:53:09 +0200 Message-Id: <83v8kykfhm.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Yoichi Nakayama on Sun, 22 Jan 2023 16:21:02 +0900) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From unknown Sat Aug 09 09:38:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Yoichi Nakayama Subject: bug#61000: closed (Re: bug#61000: emacs-28.2 hangs on displaying ill-formed python source) Message-ID: References: <83sffxen7m.fsf@gnu.org> X-Gnu-PR-Message: they-closed 61000 X-Gnu-PR-Package: emacs Reply-To: 61000@debbugs.gnu.org Date: Thu, 26 Jan 2023 08:05:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1674720302-23875-1" This is a multi-part message in MIME format... ------------=_1674720302-23875-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #61000: emacs-28.2 hangs on displaying ill-formed python source which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 61000@debbugs.gnu.org. --=20 61000: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61000 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1674720302-23875-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 61000-done) by debbugs.gnu.org; 26 Jan 2023 08:04:05 +0000 Received: from localhost ([127.0.0.1]:60580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKxEr-0006Ba-Aj for submit@debbugs.gnu.org; Thu, 26 Jan 2023 03:04:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKxEq-0006Aw-6s for 61000-done@debbugs.gnu.org; Thu, 26 Jan 2023 03:04:04 -0500 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 1pKxEl-00025P-0o; Thu, 26 Jan 2023 03:03:59 -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=Coq39ZgtfLtAjP6BOgkQwcBGylX1GXWM60s10Y3votw=; b=JZn+XXNyRpSA xLGQwSk3NSSkfGWjsbhou6jbuD01tL0fJz3qpb94Rcv3gjDlhDRcQPA2oAAQJOcng6jEcjZvbvU0f yU+69kD8Vahwm/RIcGJECpNBKfH6KGtU4x8CR+UFUXORhqcWyRqwyi7njHbO9ERho8qAQGacD1oMF 9oD89mlbCCc+7KuoxelOK1WkmW+Z296mupclN5MpxSTfZmxZh/sLCbqELVDzyIo9G4KPMYa78LO2r QYD6NHXZsPMxZhnAEMOXcjPszaaWwEXQtzrKj+UhSpmz6+HITIM2tdvNfKsYiaxqMpzxGkeY1SA6b bd116vS9ZAtoYQ7jePX7Rg==; 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 1pKxEi-0002r7-RK; Thu, 26 Jan 2023 03:03:58 -0500 Date: Thu, 26 Jan 2023 10:04:13 +0200 Message-Id: <83sffxen7m.fsf@gnu.org> From: Eli Zaretskii To: yoichi.nakayama@gmail.com In-Reply-To: <83v8kykfhm.fsf@gnu.org> (message from Eli Zaretskii on Sun, 22 Jan 2023 12:53:09 +0200) Subject: Re: bug#61000: emacs-28.2 hangs on displaying ill-formed python source References: <83v8kykfhm.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61000-done Cc: 61000-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 61000@debbugs.gnu.org > Date: Sun, 22 Jan 2023 12:53:09 +0200 > From: Eli Zaretskii > > 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 emacs-28 branch. No further comments in a week, so I'm closing this bug as fixed. ------------=_1674720302-23875-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Jan 2023 07:21:22 +0000 Received: from localhost ([127.0.0.1]:50518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJUfJ-0002IL-Q3 for submit@debbugs.gnu.org; Sun, 22 Jan 2023 02:21:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:39792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJUfH-0002IE-VK for submit@debbugs.gnu.org; Sun, 22 Jan 2023 02:21:20 -0500 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 1pJUfG-0007NB-Gk for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 02:21:18 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJUfE-0002Cu-RO for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 02:21:18 -0500 Received: by mail-pl1-x631.google.com with SMTP id z13so8752923plg.6 for ; Sat, 21 Jan 2023 23:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ZGPYnS1xEuh7Noh5U9U/fgEtpbozzOZIok3rZUtOIvw=; b=YOMXA+ShTt6xH61yuXuVW7W61W+Oe1BWyYHQpwgQIRS7fOPoVBfxrdJjMJqR3n8EEv ab82xnFG/qqN7VZBVULHBCFkqYwEZNsVamsX7whvscN9q29CldQdj3ODooKSo1jvJ4K5 /9bhwjCK/4RAKmzhZU7wRSaDvnchMaq58BGNdn9Mfi6Eb/6PONrdMilFPD3gSETCs5Q4 92DNCbKBY31eJf7zoMMTEpTMGV4JZFyeFY//OUF9e08UOhn83WBF8nrnLJ5fQyI5gEHf W84End3i+m+vHaOFZLJWNwK65l4lRpHPBrys0XqTsip2WgZOUTqB3wFXfgwjnJgfvrSe lg7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZGPYnS1xEuh7Noh5U9U/fgEtpbozzOZIok3rZUtOIvw=; b=KaZMDi1lan66ZbaIi9+qnlnoZCJdfntSA3rhBxkpytLzGTP+QvgZsPbkbyElDtxWiN ixKhk7hNpleg3bxH8us+blfsOEpZWk6BOKkZHoj7R5K8Jz21waxTkDLegqL64VaX7cSq 8fJZAfjfD4x3eAsxVtRy2LDfqm49Q0Nms1MUcrGq3wRutGdMrfSwwXbSvlM5x+mQ0eh2 34+hTOiq3CMvDG+cuZuUseCE0msRQ/hzBfMbiITGbaYVHg7UfUg9Zq3kH/QTFnldu29Z 1TdfveVjDee0djxXSQgX78elFw+D5rEa6G/YJyecUCSFhsksT4pPN9WQb8E2mcM+UBUL weXw== X-Gm-Message-State: AFqh2kohqsPkivCl8uDhVdz0JMs1tBy/vuBUJ9eUlkzDq//CYFt6oBO3 fPflOHLlk4fueMO3RI///YamITf/erZLmSDKmZww0GMOhmg= X-Google-Smtp-Source: AMrXdXvIE5nzA6UT3+dt+SPYoZVrWkB6fwpoJfPV1LoeDAVXHxCHn0+84X/EDYjDqNq5mkGYTIhZjHyXUvNpLmHw7X8= X-Received: by 2002:a17:90a:e384:b0:22b:b217:e5ea with SMTP id b4-20020a17090ae38400b0022bb217e5eamr911284pjz.206.1674372073409; Sat, 21 Jan 2023 23:21:13 -0800 (PST) MIME-Version: 1.0 From: Yoichi Nakayama Date: Sun, 22 Jan 2023 16:21:02 +0900 Message-ID: Subject: emacs-28.2 hangs on displaying ill-formed python source To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=yoichi.nakayama@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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, -- Yoichi NAKAYAMA ------------=_1674720302-23875-1--