[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Protect against an infloop in python-mode

From: Philipp Stephani
Subject: Re: [PATCH] Protect against an infloop in python-mode
Date: Thu, 23 Mar 2017 22:08:15 +0000

Philipp Stephani <address@hidden> schrieb am Di., 28. Feb. 2017 um 22:32 Uhr:
There appears to be an edge case caused by using `syntax-ppss' in a
narrowed buffer during JIT lock inside of Python triple-quote strings.
Unfortunately it is impossible to reproduce without manually
destroying the syntactic information in the Python buffer, but it has
been observed in practice.  In that case it can happen that the syntax
caches get sufficiently out of whack so that there appear to be
overlapping strings in the buffer.  As Python has no nested strings,
this situation is impossible and leads to an infloop in
`python-nav-end-of-statement'.  Protect against this by checking
whether the search for the end of the current string makes progress.

* python.el (python-nav-end-of-statement): Protect against infloop.
* progmodes/python-tests.el
(python-tests--python-nav-end-of-statement--infloop): Add unit test.

Pushed as 4fbd330fae. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]