From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#10664: 24.0.93; JIT font-lock infloops in a C file Date: Tue, 7 Feb 2012 21:34:01 +0000 Message-ID: <20120207213401.GB17530@acm.acm> References: <83wr89qcay.fsf@gnu.org> <83bopdcfe5.fsf@gnu.org> <20120206110957.GA2731@acm.acm> <83wr7zc2r2.fsf@gnu.org> <20120207192032.GA17530@acm.acm> <83y5se9x9a.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1328650517 4274 80.91.229.3 (7 Feb 2012 21:35:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2012 21:35:17 +0000 (UTC) Cc: 10664@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 22:35:16 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rusgy-0001Ut-EY for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2012 22:35:12 +0100 Original-Received: from localhost ([::1]:45573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rusgx-0000vE-Rm for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2012 16:35:11 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:37324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rusgu-0000t2-Mw for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2012 16:35:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rusgt-00032J-Cd for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2012 16:35:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rusgq-0002zD-Jg; Tue, 07 Feb 2012 16:35:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rushl-00013b-R1; Tue, 07 Feb 2012 16:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 07 Feb 2012 21:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10664 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 10664-submit@debbugs.gnu.org id=B10664.13286505164001 (code B ref 10664); Tue, 07 Feb 2012 21:36:01 +0000 Original-Received: (at 10664) by debbugs.gnu.org; 7 Feb 2012 21:35:16 +0000 Original-Received: from localhost ([127.0.0.1]:59493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rush2-00012T-7h for submit@debbugs.gnu.org; Tue, 07 Feb 2012 16:35:16 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:54434 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rush0-00012K-4j for 10664@debbugs.gnu.org; Tue, 07 Feb 2012 16:35:15 -0500 Original-Received: (qmail 55104 invoked by uid 3782); 7 Feb 2012 21:34:14 -0000 Original-Received: from acm.muc.de (pD9557B8E.dip.t-dialin.net [217.85.123.142]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 07 Feb 2012 22:34:13 +0100 Original-Received: (qmail 18290 invoked by uid 1000); 7 Feb 2012 21:34:01 -0000 Content-Disposition: inline In-Reply-To: <83y5se9x9a.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56677 Archived-At: Hello, Eli. On Tue, Feb 07, 2012 at 10:58:09PM +0200, Eli Zaretskii wrote: > > Date: Tue, 7 Feb 2012 19:20:33 +0000 > > Cc: 10664@debbugs.gnu.org > > From: Alan Mackenzie > > I've done a binary chop on this, and the following revision made this bug > > apparent: > > revno: 106729 > > committer: Alan Mackenzie > > branch nick: trunk > > timestamp: Sat 2011-12-24 19:32:31 +0000 > > message: > > Introduce a mechanism to widen the region used in context font locking. > > Use this to protect declarations from losing their contexts. > > I'll see what I can work out from this. At least it's one of mine. ;-) > Great, thanks. I understand what's happening, now. The new code (from 2011-12-24), given a point, is calculating a "safe" position backwards from that point to start fontifying from. This is a position which gives the correct context for the original point. For one particular fontification in socket.c, the "safe position" is 500 bytes back from the starting point, so jit-lock is pushed back these 500 bytes, fontifies the next 500 bytes (`jit-lock-chunk-size'), then has its new start position set back 500 bytes, rinse, spin, repeat. I don't understand yet why this isn't happening a lot more frequently. I think it's got something to do with the safe position being _exactly_ 500 bytes back. I don't know what to do about this yet, but I'll think of something. Good night! -- Alan Mackenzie (Nuremberg, Germany).