GNU bug report logs - #23271
CC Mode 5.33 (C/l); Cache failure

Previous Next

Package: cc-mode;

Reported by: Michael Welsh Duggan <mwd <at> md5i.com>

Date: Mon, 11 Apr 2016 21:23:01 UTC

Severity: normal

Full log


Message #20 received at 23271 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Michael Welsh Duggan <mwd <at> cert.org>
Cc: 23271 <at> debbugs.gnu.org
Subject: Re: bug#23271: CC Mode 5.33 (C/l); Cache failure
Date: Sun, 15 May 2016 13:04:50 +0000
Hello again, Michael.

On Thu, May 05, 2016 at 03:49:58PM -0400, Michael Welsh Duggan wrote:
> Alan Mackenzie <acm <at> muc.de> writes:

> > Hello, Michael.

> > On Tue, Apr 26, 2016 at 04:18:50PM -0400, Michael Welsh Duggan wrote:
> >> Alan Mackenzie <acm <at> muc.de> writes:

[ .... ]

> > I think the issue here is `open-paren-in-column-0-is-defun-start'.  In

> >>> c-parse-state inconsistency at 33929: using cache: (33928 33838
> >>> (32429 . 33731) 795 365), from scratch: (33928 33838 (32429
> >>> . 33731))

> > , the brace pair (32429 . 33731)'s opener at 32429 is in column zero.
> > So, if `open-paren-...-start' is non-nil, the low level syntax routines
> > aren't going to be scanning back any further than that.  I think, in
> > this case, the braces at 365 and 795 got into the cache early on, and
> > stayed there.

> > Would you check your setting of that variable, please, and if it's
> > non-nil, try setting it to nil to see if the inconsistency goes away.
> > If it's already nil, please let me know, in which case I've got some
> > serious head scratching to do.

> This occurs with a nil setting of
> `open-paren-in-column-0-is-defun-start'.  It was nil when I submitted
> the original bug report.  (You might want to add this variable to the
> c-submit-bug-report report.)

> Apologies in advance for any hair loss.  :)

Sorry to be persistent, but can we please be absolutely sure about this.
open-paren-in-column-0-is-defun-start is t by default.  In your original
bug recipe, you don't mention setting that variable to nil.

It's just that with the default setting of o-p-i-column-0-i-d-start, I
can reproduce your exact results.

> I tried it on a different machine with the same frame width (but
> different frame height), and got the included output after 8 page-downs.
> The last full line on the first page is:

>    *    <li>the graph is bidirectional ("bidrectionalS" as the third template argument),</li>

> I hope this differing output helps you track down the problem.

I think this is something different.  I can't reproduce it at the moment,
but I'll keep trying.  The source line is line 53.  So the number of
lines scrolled per C-v must be ~6.  With next-screen-context-lines at its
default of 2, that suggests a window 8 lines high, not counting wrapped
lines.  With (...'((height .11))), I can count 9 C-v's before L53 becomes
the bottom line.  But I don't get the inconsistency.  I'll keep trying.

> c-debug-parse-state enabled
> c-parse-state inconsistency at 25771: using cache: (25731 (25567 . 25569) 25148), from scratch: (25731 (25567 . 25569) 25148 (24724 . 24726))
> Old state:
> (setq c-state-cache '(25772 25731 (25567 . 25569) 25148 (24419 . 24884) 7660 795 365)  c-state-cache-good-pos 25773  c-state-nonlit-pos-cache '(53334 50334 47334 44334 41334 38334 35334 32334 29099 26099 23099 20099 17099 13993 10731 7641)  c-state-nonlit-pos-cache-limit 53334  c-state-semi-nonlit-pos-cache '(23099 20099 17099 13993 10731 7641)  c-state-semi-nonlit-pos-cache-limit 23099  c-state-brace-pair-desert nil  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 25898)
> c-parse-state inconsistency at 25730: using cache: ((25567 . 25569) 25148), from scratch: ((25567 . 25569) 25148 (24724 . 24726))
> Old state:
> (setq c-state-cache '(25772 25731 (25567 . 25569) 25148 (24419 . 24884) 7660 795 365)  c-state-cache-good-pos 25773  c-state-nonlit-pos-cache '(53334 50334 47334 44334 41334 38334 35334 32334 29099 26099 23099 20099 17099 13993 10731 7641)  c-state-nonlit-pos-cache-limit 53334  c-state-semi-nonlit-pos-cache '(23099 20099 17099 13993 10731 7641)  c-state-semi-nonlit-pos-cache-limit 23099  c-state-brace-pair-desert nil  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 25898)
> c-parse-state inconsistency at 25695: using cache: ((25567 . 25569) 25148), from scratch: ((25567 . 25569) 25148 (24724 . 24726))
> Old state:
> (setq c-state-cache '(25772 25731 (25567 . 25569) 25148 (24419 . 24884) 7660 795 365)  c-state-cache-good-pos 25773  c-state-nonlit-pos-cache '(53334 50334 47334 44334 41334 38334 35334 32334 29099 26099 23099 20099 17099 13993 10731 7641)  c-state-nonlit-pos-cache-limit 53334  c-state-semi-nonlit-pos-cache '(23099 20099 17099 13993 10731 7641)  c-state-semi-nonlit-pos-cache-limit 23099  c-state-brace-pair-desert nil  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 25898)
> c-parse-state inconsistency at 25569: using cache: ((25567 . 25569) 25148), from scratch: ((25567 . 25569) 25148 (24724 . 24726))
> Old state:
> (setq c-state-cache '(25772 25731 (25567 . 25569) 25148 (24419 . 24884) 7660 795 365)  c-state-cache-good-pos 25773  c-state-nonlit-pos-cache '(53334 50334 47334 44334 41334 38334 35334 32334 29099 26099 23099 20099 17099 13993 10731 7641)  c-state-nonlit-pos-cache-limit 53334  c-state-semi-nonlit-pos-cache '(23099 20099 17099 13993 10731 7641)  c-state-semi-nonlit-pos-cache-limit 23099  c-state-brace-pair-desert nil  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 25898)
> c-parse-state inconsistency at 25730: using cache: ((25567 . 25569) 25148), from scratch: ((25567 . 25569) 25148 (24724 . 24726))
> Old state:
> (setq c-state-cache '(25772 25731 (25567 . 25569) 25148 (24419 . 24884) 7660 795 365)  c-state-cache-good-pos 25773  c-state-nonlit-pos-cache '(53334 50334 47334 44334 41334 38334 35334 32334 29099 26099 23099 20099 17099 13993 10731 7641)  c-state-nonlit-pos-cache-limit 53334  c-state-semi-nonlit-pos-cache '(23099 20099 17099 13993 10731 7641)  c-state-semi-nonlit-pos-cache-limit 23099  c-state-brace-pair-desert nil  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 25898)
> c-parse-state inconsistency at 25695: using cache: ((25567 . 25569) 25148), from scratch: ((25567 . 25569) 25148 (24724 . 24726))
> Old state:
> (setq c-state-cache '(25772 25731 (25567 . 25569) 25148 (24419 . 24884) 7660 795 365)  c-state-cache-good-pos 25773  c-state-nonlit-pos-cache '(53334 50334 47334 44334 41334 38334 35334 32334 29099 26099 23099 20099 17099 13993 10731 7641)  c-state-nonlit-pos-cache-limit 53334  c-state-semi-nonlit-pos-cache '(23099 20099 17099 13993 10731 7641)  c-state-semi-nonlit-pos-cache-limit 23099  c-state-brace-pair-desert nil  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 25898)
> c-parse-state inconsistency at 25569: using cache: ((25567 . 25569) 25148), from scratch: ((25567 . 25569) 25148 (24724 . 24726))
> Old state:
> (setq c-state-cache '(25772 25731 (25567 . 25569) 25148 (24419 . 24884) 7660 795 365)  c-state-cache-good-pos 25773  c-state-nonlit-pos-cache '(53334 50334 47334 44334 41334 38334 35334 32334 29099 26099 23099 20099 17099 13993 10731 7641)  c-state-nonlit-pos-cache-limit 53334  c-state-semi-nonlit-pos-cache '(23099 20099 17099 13993 10731 7641)  c-state-semi-nonlit-pos-cache-limit 23099  c-state-brace-pair-desert nil  c-state-point-min 1  c-state-point-min-lit-type nil  c-state-point-min-lit-start nil  c-state-min-scan-pos 1  c-state-old-cpp-beg nil  c-state-old-cpp-end nil  c-parse-state-point 25898)


> -- 
> Michael Welsh Duggan
> (mwd <at> cert.org)

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 9 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.