From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22983: syntax-ppss returns wrong result. Date: Sat, 2 Sep 2017 17:40:27 +0000 Message-ID: <20170902174027.GB4267@ACM> References: <20160311151512.GD2888@acm.fritz.box> <44b4fa9e-ec8e-98a4-d8ad-e799fffa7959@yandex.ru> <20160319122759.GA2644@acm.fritz.box> <9f36a39b-ea9f-2f61-5400-68de18526ab1@yandex.ru> <9fc66395-045c-1984-f530-033c2ff706f6@yandex.ru> <83h8wlz1kf.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1504374339 7039 195.159.176.226 (2 Sep 2017 17:45:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Sep 2017 17:45:39 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: jwiegley@gmail.com, Dmitry Gutov , 22983@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 02 19:45:23 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doCTo-0000ZP-HZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Sep 2017 19:45:12 +0200 Original-Received: from localhost ([::1]:40037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doCTv-0004wI-LK for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Sep 2017 13:45:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doCTk-0004rZ-Dg for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 13:45:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doCTf-0000BV-F0 for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 13:45:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doCTf-0000BP-B7 for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 13:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1doCTf-0003lu-31 for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 13:45:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Sep 2017 17:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22983-submit@debbugs.gnu.org id=B22983.150437425514379 (code B ref 22983); Sat, 02 Sep 2017 17:45:03 +0000 Original-Received: (at 22983) by debbugs.gnu.org; 2 Sep 2017 17:44:15 +0000 Original-Received: from localhost ([127.0.0.1]:43776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doCSt-0003jq-JD for submit@debbugs.gnu.org; Sat, 02 Sep 2017 13:44:15 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:47848 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1doCSr-0003jf-2r for 22983@debbugs.gnu.org; Sat, 02 Sep 2017 13:44:13 -0400 Original-Received: (qmail 4836 invoked by uid 3782); 2 Sep 2017 17:44:11 -0000 Original-Received: from acm.muc.de (p548C6611.dip0.t-ipconnect.de [84.140.102.17]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 02 Sep 2017 19:44:10 +0200 Original-Received: (qmail 6721 invoked by uid 1000); 2 Sep 2017 17:40:27 -0000 Content-Disposition: inline In-Reply-To: <83h8wlz1kf.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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" Xref: news.gmane.org gmane.emacs.bugs:136506 Archived-At: Hello, Eli. On Sat, Sep 02, 2017 at 16:12:48 +0300, Eli Zaretskii wrote: > unblock 24655 by 22983 > thanks > > From: Dmitry Gutov > > Date: Mon, 4 Apr 2016 02:15:50 +0300 > > Cc: Alan Mackenzie , 22983@debbugs.gnu.org > > On 04/04/2016 01:58 AM, John Wiegley wrote: > > > Have things reached a satisfactory conclusion now? It was hard for me to tell > > > by the end of this thread. > > It's a separate discussion, see > > http://lists.gnu.org/archive/html/emacs-devel/2016-03/msg01576.html > > > Sure, though it's experimental nature does get taken into account. If a thing > > > is wrong, I'm not interested in accommodating existing workarounds to its > > > wrongness. > > What experimental nature? > It doesn't sound like this discussion is leading anywhere, and since > almost 1.5 years has passed with no comments, I guess this bug doesn't > need to block the release of Emacs 26.1, at least. I'm not happy about this. 22983 is a serious design flaw, which has had deleterious effects deep within Emacs. One recorded example, resulting in an infinite loop, is: ######################################################################### From: Philipp Stephani To: emacs-devel@gnu.org Subject: [PATCH] Protect against an infloop in python-mode Date: Tue, 28 Feb 2017 22:31:49 +0100 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. ######################################################################### In this case, Philipp had to apply a workaround. Seeing as how Stefan is not prepared to take responsibility for his own bugs, I suggest that I fix it, something I really don't want to spend time on. Before I do start spending time on it, I would like some assurance that my fix will not be blocked or reverted (both have happened to other things in the core I've worked on), and that I will have a reasonable amount of time to get the job done (a few weeks) before any freeze for Emacs 25.3 or 26 comes into force. > Thanks. -- Alan Mackenzie (Nuremberg, Germany).