From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#21629: 25.0.50; python.el freezes up around docstrings. Date: Thu, 08 Oct 2015 16:27:54 +0200 Message-ID: <56167D6A.5070507@easy-emacs.de> References: <83fv1oxd2v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1444314683 28923 80.91.229.3 (8 Oct 2015 14:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Oct 2015 14:31:23 +0000 (UTC) To: 21629@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 08 16:31:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from eggs.gnu.org ([208.118.235.92]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZkCDq-0004FM-2L for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 16:31:06 +0200 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkCDX-0006Wj-5c for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 10:31:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCDX-0006WN-31 for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 10:30:47 -0400 Original-Received: from localhost ([::1]:35200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCDX-0008JV-0s for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 10:30:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCCZ-0008By-Ji for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:30:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkCBr-0004q6-0u for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:29:47 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCBq-0004pF-SP for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZkCBq-0007fN-Kt for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Oct 2015 14:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21629 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144431451529437 (code B ref -1); Thu, 08 Oct 2015 14:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Oct 2015 14:28:35 +0000 Original-Received: from localhost ([127.0.0.1]:60964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkCBP-0007ei-D4 for submit@debbugs.gnu.org; Thu, 08 Oct 2015 10:28:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34373) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkCBM-0007ea-Rp for submit@debbugs.gnu.org; Thu, 08 Oct 2015 10:28:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkCBL-0003bB-PN for submit@debbugs.gnu.org; Thu, 08 Oct 2015 10:28:32 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCBL-0003b4-NE for submit@debbugs.gnu.org; Thu, 08 Oct 2015 10:28:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCBI-0007cn-Ld for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:28:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkCAz-0003PV-Ii for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:28:28 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:55034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCAz-0003Ot-DA for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:28:09 -0400 Original-Received: from [192.168.178.31] ([77.6.170.87]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0LdtKd-1aS1RD0b0F-00izoe for ; Thu, 08 Oct 2015 16:28:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <83fv1oxd2v.fsf@gnu.org> X-Provags-ID: V03:K0:S3zHKzk80H3M+6mW+EI/Y/l/VKVQE0G/NSyjHIUExAPbQV65VZ/ sYEY6bU+w13CXZNl1wrp+dob6E+FlvqTqo4l4TkYTfAQMOZ5CShKYK1aNjxmYBWBxA3ABd+ /c9X2gqHmy+6NjGHFdtgOdCacjrBfmB0C315/I0nMw4y80uCROpJnCcNT31iurpn0rhEYOi nW7rcOpZwMOtVp8CYf0Nw== X-UI-Out-Filterresults: notjunk:1;V01:K0:KAxzvtLltmM=:tbX2Xp2A14yKNUwZK5Gy38 H/DL3ODofxbXiZsRWIdKzsV85CMrFvg+PBTV7e4TNzlyiGMS25UMrY0UO1vA21shb3mOUd1xV +WrSUNxp0sp5veaa2CfLPRQrRORjkw3RP7xUbBbA/aZYyj2ADu33jeBPEBWOorLyWT7gH79XV 4JI7HQkDIYfaA/tkUAsLIxGeN3w3cJr6u06+yenxLoVltYTgiYDDpd3KlQq4lWEHq8+k8/qCe IfLjcvTccA54ZOmfJaG3TyijTzHaju4tHyQjLSwWZ13erzQKTXqo5YyG5Ax9iOPXR1R4rMCjm MGQ549JN16KnQ6kDGA6x2uobbjlyKwXXQpTUpAqPCbGDOPDfjOQcE8yUzv6M6nTmICPwu8LgO XiOkEsbOw3uYpmuBEcL4/GQrd/9T8UY02406GIukVA36eir52OIszc7B2FSAVZzFnvmZWXWI6 KfzumKaikOY8vrmirvhjEDh+0MKgjdqXpwSj/7e8NghGkY9xiqdzTgHmnlHxnbLwp7V+xAEXG YMKIq0nQUmab0WR5aaEhJenG2HTig+py4bAJagW5GcDqzgYPr/cuiVAnRl9IjtLzOfc1Kmufy 2BJ8HMZ3vKqQLsRxUauvB2OsWk1Hl8Y1ocsz6lwjl3NSM2BiNe2RmtDQ6MSGTxaCA0UAm4JZu CBeLSXIkwO7iU44J8hRprKG+Wua5b0KMhKB+aVib7JksZ4CF/7bXMDwm6VNvpNZjWDXUqcIIV HkwKAXnAKPcdQDsuhPp8s3vjI1F3XTnZSjNO4ErRzARacOAeZCyOhlLzbP/PbhrA9ZQLZM1t X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 Xref: news.gmane.org gmane.emacs.bugs:107441 Archived-At: Am 06.10.2015 um 16:54 schrieb Eli Zaretskii: >> From: Jacob MacDonald >> Date: Tue, 06 Oct 2015 04:48:50 +0000 >> >> Begin from a fresh 'emacs -Q'. Create a Python file. Insert a long >> docstring which contains a header line and then a long body which >> includes a few line breaks and spaces in it. The docstring should look >> something like this: >> >> """test header >> >> lorem ipsum... more text more text more text >> x10 lines >> ... >> ... >> """ >> >> Save the file and close emacs. Start a fresh 'emacs -Q'. Open dired in >> the directory which contains the Python file you created. Navigate to >> the file and try to open in from dired. Emacs will freeze indefinitely >> and eat all the system resources it can. You can break the cycle by >> pressing C-q many times, but the freeze happens again on every single >> redisplay. If you wait awhile before cancelling the redisplay, you may >> see that fontification has frozen somewhere in the middle of the docstring. > It infloops in python-nav-end-of-statement. The loop there ends up > one position before EOB, then jumps back to string-start, and so on > and so forth, ad nauseam. > > I have no idea what causes this, but I hope Python-mode experts and > perhaps Stefan (due to syntax stuff) will be able to figure this out. > > > > With a while-loop reading complex conditions IMO there is always an abstract danger. python-mode.el uses a heuristic exit: `py-max-specpdl-size' - default is `max-specpdl-size'