GNU bug report logs - #10480
24.0.92; cc-mode breakage due to "Large brace-block initialisation makes CC Mode slow: Fix"

Previous Next

Packages: emacs, cc-mode;

Reported by: Alex <alex <at> bennee.com>

Date: Wed, 11 Jan 2012 17:05:02 UTC

Severity: important

Merged with 10463

Found in version 24.0.92

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10480 in the body.
You can then email your comments to 10480 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10480; Package emacs. (Wed, 11 Jan 2012 17:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex <alex <at> bennee.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 11 Jan 2012 17:05:02 GMT) Full text and rfc822 format available.

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

From: Alex <alex <at> bennee.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.92;
	cc-mode breakage due to "Large brace-block initialisation makes CC
	Mode slow: Fix"
Date: Wed, 11 Jan 2012 16:37:51 +0100
I'm currently tracking the Emacs BZR/GIT repo for the current bleeding
edge code. It seems it broke over Christmas. While editing C code I was
constantly hit with back traces like the following:

Debugger entered--Lisp error: (args-out-of-range 10389 15607)
  parse-partial-sexp(10389 15607)
  c-literal-limits(nil nil t)
  c-indent-new-comment-line(t)
  default-indent-new-line(t)
  do-auto-fill()
  apply(do-auto-fill nil)
  c-mask-paragraph(nil t do-auto-fill)
  c-do-auto-fill()
  self-insert-command(1)
  newline()
  newline-and-indent()
  call-interactively(newline-and-indent nil nil)

This often left emacs unusable, sometime wiping the current editing
buffer. Bisecting through the code tree I found it was the Large
brace-block fix that causes the regression. I'm afraid I can't provide
the code it broke on but was occurring all over the place so I don't
think it was anything special.

Regards,

Alex




Forcibly Merged 10463 10480. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 11 Jan 2012 19:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#10480; Package emacs,cc-mode. (Sun, 15 Jan 2012 10:08:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Alex <alex <at> bennee.com>
Cc: bug-gnu-emacs <at> gnu.org, 10480 <at> debbugs.gnu.org
Subject: Re: bug#10480: 24.0.92;?cc-mode breakage due to "Large brace-block
	initialisation makes CC?Mode slow: Fix"
Date: Sun, 15 Jan 2012 09:59:41 +0000
In article <mailman.1652.1326301490.15002.bug-gnu-emacs <at> gnu.org> you
wrote:
>
> I'm currently tracking the Emacs BZR/GIT repo for the current bleeding
> edge code. It seems it broke over Christmas. While editing C code I
> was
> constantly hit with back traces like the following:

> Debugger entered--Lisp error: (args-out-of-range 10389 15607)
>  parse-partial-sexp(10389 15607)
>  c-literal-limits(nil nil t)
>  c-indent-new-comment-line(t)
>  default-indent-new-line(t)
>  do-auto-fill()
>  apply(do-auto-fill nil)
>  c-mask-paragraph(nil t do-auto-fill)
>  c-do-auto-fill()
>  self-insert-command(1)
>  newline()
>  newline-and-indent()
>  call-interactively(newline-and-indent nil nil)

Sorry about this, and thanks for reporting the bug.

> This often left emacs unusable, sometime wiping the current editing
> buffer. Bisecting through the code tree I found it was the Large
> brace-block fix that causes the regression.

This looks to be the same as bug #10463 which has already been fixed.
The fix was committed to the savannah repository on 2012-01-11, revision
#106849.

Would you please apply that bug's patch and let me know if it fails to
fix the current bug.  Here is that patch:


*** orig/cc-engine.el	2012-01-09 20:27:51.000000000 +0000
--- cc-engine.el	2012-01-10 11:09:42.000000000 +0000
***************
*** 4225,4236 ****
  
  Note that this function might do hidden buffer changes.	 See the
  comment at the start of cc-engine.el for more info."
!   (let* ((safe-place (c-state-safe-place (point)))
! 	 (lit (c-state-pp-to-literal safe-place (point))))
!     (or (cadr lit)
! 	(and detect-cpp
! 	     (save-excursion (c-beginning-of-macro))
! 	     'pound))))
  
  (defun c-literal-limits (&optional lim near not-in-delimiter)
    "Return a cons of the beginning and end positions of the comment or
--- 4225,4238 ----
  
  Note that this function might do hidden buffer changes.	 See the
  comment at the start of cc-engine.el for more info."
!   (save-restriction
!     (widen)
!     (let* ((safe-place (c-state-safe-place (point)))
! 	   (lit (c-state-pp-to-literal safe-place (point))))
!       (or (cadr lit)
! 	  (and detect-cpp
! 	       (save-excursion (c-beginning-of-macro))
! 	       'pound)))))
  
  (defun c-literal-limits (&optional lim near not-in-delimiter)
    "Return a cons of the beginning and end positions of the comment or
***************
*** 4250,4258 ****
    (save-excursion
      (let* ((pos (point))
  	   (lim (or lim (c-state-safe-place pos)))
! 	   (pp-to-lit (c-state-pp-to-literal lim pos))
  	   (state (car pp-to-lit))
- 	   (lit-type (cadr pp-to-lit))
  	   (lit-limits (car (cddr pp-to-lit))))
  
        (cond
--- 4252,4261 ----
    (save-excursion
      (let* ((pos (point))
  	   (lim (or lim (c-state-safe-place pos)))
! 	   (pp-to-lit (save-restriction
! 			(widen)
! 			(c-state-pp-to-literal lim pos)))
  	   (state (car pp-to-lit))
  	   (lit-limits (car (cddr pp-to-lit))))
  
        (cond


> Regards,

> Alex

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#10480; Package emacs,cc-mode. (Sun, 15 Jan 2012 10:08:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 12 Feb 2012 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 189 days ago.

Previous Next


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