GNU bug report logs -
#21629
25.0.50; python.el freezes up around docstrings.
Previous Next
Reported by: Jacob MacDonald <jaccarmac <at> gmail.com>
Date: Tue, 6 Oct 2015 05:44:02 UTC
Severity: normal
Tags: confirmed, fixed, patch
Merged with 21628,
21646,
21657,
21671,
24839,
24856,
24905,
26041
Found in versions 25.0.50, 25.1, 25.1.50, 26.0.50
Fixed in version 25.2
Done: Daniel Colascione <dancol <at> dancol.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):
Am 06.10.2015 um 16:54 schrieb Eli Zaretskii:
>> From: Jacob MacDonald <jaccarmac <at> gmail.com>
>> 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'
This bug report was last modified 8 years and 71 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.