From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Date: Tue, 30 Apr 2019 11:33:02 +0000 Message-ID: <20190430113302.GB4142@ACM> References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="65213"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 28850@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 30 13:34:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLR1d-000GoV-R8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 13:34:17 +0200 Original-Received: from localhost ([127.0.0.1]:44806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLR1c-0006FY-On for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 07:34:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLR1V-0006FL-HU for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 07:34:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLR1T-0004zO-M2 for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 07:34:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55413) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLR1O-0004x3-Q3 for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 07:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hLR1O-0003Jj-Ik for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 07:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Apr 2019 11:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28850 X-GNU-PR-Package: emacs Original-Received: via spool by 28850-submit@debbugs.gnu.org id=B28850.155662399112685 (code B ref 28850); Tue, 30 Apr 2019 11:34:02 +0000 Original-Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 11:33:11 +0000 Original-Received: from localhost ([127.0.0.1]:40724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLR0Z-0003IX-50 for submit@debbugs.gnu.org; Tue, 30 Apr 2019 07:33:11 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:61483 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hLR0T-0003IJ-WF for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 07:33:06 -0400 Original-Received: (qmail 10420 invoked by uid 3782); 30 Apr 2019 11:33:04 -0000 Original-Received: from acm.muc.de (p4FE15EC5.dip0.t-ipconnect.de [79.225.94.197]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Apr 2019 13:33:02 +0200 Original-Received: (qmail 5670 invoked by uid 1000); 30 Apr 2019 11:33:02 -0000 Content-Disposition: inline In-Reply-To: <87o94oz210.fsf@tcd.ie> 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: 209.51.188.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:158485 Archived-At: Hello again, Basil. On Tue, Apr 30, 2019 at 02:51:03 +0100, Basil L. Contovounesios wrote: > Eli Zaretskii writes: > >> Date: Wed, 25 Oct 2017 19:11:37 +0000 > >> Cc: 28850@debbugs.gnu.org > >> From: Alan Mackenzie > >> Actually, it wasn't that difficult to amend that form generator. Would > >> you please try out the patch below, which should apply cleanly to > >> master. > > I think you've solved the problem, because I let Emacs run idle for 10 > > hours, and it didn't hit this error even once. > It seems to have returned in some way. I can't reproduce this on Emacs > 26, but on latest master, the following steps: > 0. emacs -Q > 1. (progn (setq debug-on-error t) > (setq jit-lock-stealth-nice nil) > (setq jit-lock-stealth-time 0) > (find-function #'next-property-change)) > 2. C-x C-e > almost immediately lead to the following backtrace: > Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)") > search-forward-regexp("\\<\\(\\(?:enum\\)\\)\\>[^][{};/#=]*{" 1673 t) > c-font-lock-enum-body(1673) > font-lock-fontify-keywords-region(1123 1673 nil) > font-lock-default-fontify-region(1123 1673 nil) > c-font-lock-fontify-region(1173 1673 nil) > font-lock-fontify-region(1173 1673) > #f(compiled-function (fun) #)(font-lock-fontify-region) > run-hook-wrapped(#f(compiled-function (fun) #) font-lock-fontify-region) > jit-lock--run-functions(1173 1673) > jit-lock-fontify-now(1173 1673) > jit-lock-stealth-fontify(t) > apply(jit-lock-stealth-fontify t) > timer-event-handler([t 0 0 974323 nil jit-lock-stealth-fontify (t) idle 261000]) The cause of this is a (search-forward-regexp limit t) in a loop, where the code fails to check (< (point) limit) at the start. In textprop.c in master, it so happens that the last successful iteration of the loop leaves point beyond limit. So we get the exception. This is easy to correct, but first I'm going to check for all the other places where the same mistake occurs. Expect a patch soon! [ .... ] > Thanks, > -- > Basil -- Alan Mackenzie (Nuremberg, Germany).