all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: Philipp Stephani <phst@google.com>, emacs-devel@gnu.org
Subject: Re: [PATCH] Protect against an infloop in python-mode
Date: Sun, 26 Mar 2017 18:49:18 +0000	[thread overview]
Message-ID: <CAArVCkQz0CoH1ybk-ZF0w+Qqq=Wf4X5-NOsKBCQc2uwo6VNd=w@mail.gmail.com> (raw)
In-Reply-To: <20170324175318.GA2254@acm>

[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]

Alan Mackenzie <acm@muc.de> schrieb am Fr., 24. März 2017 um 18:53 Uhr:

> Hello, Philipp.
>
> On Thu, Mar 23, 2017 at 22:08:15 +0000, Philipp Stephani wrote:
> > Philipp Stephani <p.stephani2@gmail.com> 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.
>
> I think it's fair to say that syntax-ppss doesn't work in narrowed
> buffers.  This has been known for a long time now - I raised bug #22983
> about this topic over a year ago, yet despite repeated requests from
> myself, there are no signs this is going to be fixed any time soon.
>
> I "welcome" your misfortune, as it shows that the flaws in syntax-ppss
> in narrowed buffers occur in real situations, not just test cases.
> Presumably, diagnosing the bug took up quite a lot of your valuable
> time.
>
> Let's get bug #22983 fixed.
>
>
Agreed. I'm not 100% positive that it's the same bug, but it's very likely.

[-- Attachment #2: Type: text/html, Size: 2671 bytes --]

      reply	other threads:[~2017-03-26 18:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 21:31 [PATCH] Protect against an infloop in python-mode Philipp Stephani
2017-03-23 22:08 ` Philipp Stephani
2017-03-24 17:53   ` Alan Mackenzie
2017-03-26 18:49     ` Philipp Stephani [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkQz0CoH1ybk-ZF0w+Qqq=Wf4X5-NOsKBCQc2uwo6VNd=w@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=phst@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.