GNU bug report logs -
#29024
CC-mode infinite loop on typing < in template spec
Previous Next
Reported by: Richard Copley <rcopley <at> gmail.com>
Date: Fri, 27 Oct 2017 07:30:01 UTC
Severity: normal
Tags: confirmed, fixed
Merged with 28926
Found in version 26.0.90
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
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 29024 in the body.
You can then email your comments to 29024 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 07:30:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Richard Copley <rcopley <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 27 Oct 2017 07:30:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In an empty CC-mode buffer, after typing "template <", Emacs enters an
infinite loop.
This was asked about here:
<https://emacs.stackexchange.com/questions/36423/emacs-hangs-on-c-mode-when-writting-the-character>
and reported on the emacs-devel list here:
<http://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00809.html>.
Recipe:
1. Visit an empty or non-existent .cpp file
2. Type "template <". Emacs hangs.
To trigger the bug again,
3. M-x erase-buffer RET
4. M-x normal-mode RET
5. Go to step 2.
The Emacs-lisp backtrace on quit is:
Debugger entered--Lisp error: (quit)
c-forward-<>-arglist-recur(nil)
c-forward-<>-arglist(nil)
c-restore-<>-properties(10 11 0)
#f(compiled-function (fn) #<bytecode 0x22e5bad>)(c-restore-<>-properties)
mapc(#f(compiled-function (fn) #<bytecode 0x22e5bad>)
(c-depropertize-new-text c-parse-quotes-after-change
c-extend-font-lock-region-for-macros
c-after-change-re-mark-raw-strings c-neutralize-syntax-in-and-mark-CPP
c-restore-<>-properties c-change-expand-fl-region))
c-after-change(10 11 0)
self-insert-command(1)
c-electric-lt-gt(nil)
funcall-interactively(c-electric-lt-gt nil)
call-interactively(c-electric-lt-gt nil nil)
command-execute(c-electric-lt-gt)
In GNU Emacs 26.0.90 (build 1, x86_64-w64-mingw32)
of 2017-10-13 built on MACHINE
Repository revision: d79fbb1818dc442ce71e7b55a8f1a4995d6fcd9e
Windowing system distributor 'Microsoft Corp.', version 10.0.15063
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Debug on Quit enabled globally
Entering debugger...
Configured using:
'configure --config-cache --with-modules --without-pop 'CFLAGS=-O3
-ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES LCMS2
Important settings:
value of $EMACSLOADPATH: c:\emacs-lisp;
value of $LANG: en_GB.UTF-8
locale-coding-system: cp1252
Major mode: Debugger
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq dired
dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived
epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode
cl-print byte-opt gv bytecomp byte-compile cconv debug cus-start
cus-load cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote w32notify w32 lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 125933 9286)
(symbols 56 23532 1)
(miscs 48 69 106)
(strings 32 37375 1623)
(string-bytes 1 1065619)
(vectors 16 17502)
(vector-slots 8 519143 6247)
(floats 8 58 316)
(intervals 56 311 17)
(buffers 992 13))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 07:42:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 29024 <at> debbugs.gnu.org (full text, mbox):
merge 28926 29024
thanks
#29024 appears to be the same bug as #28926.
Merged 28926 29024.
Request was from
Richard Copley <rcopley <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Fri, 27 Oct 2017 07:42:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 08:30:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 29024 <at> debbugs.gnu.org (full text, mbox):
> From: Richard Copley <rcopley <at> gmail.com>
> Date: Fri, 27 Oct 2017 08:40:45 +0100
>
> #29024 appears to be the same bug as #28926.
Strangely enough, with today's emacs-26 branch, I cannot reproduce
either of those two recipes. I can reproduce them with stock 26.0.90
pretest, though. Maybe this only happens in optimized builds?
Alan, are you looking into this?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 08:35:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 29024 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 27 Oct 2017 11:28:47 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: Alan Mackenzie <acm <at> muc.de>, 29024 <at> debbugs.gnu.org
>
> > From: Richard Copley <rcopley <at> gmail.com>
> > Date: Fri, 27 Oct 2017 08:40:45 +0100
> >
> > #29024 appears to be the same bug as #28926.
>
> Strangely enough, with today's emacs-26 branch, I cannot reproduce
> either of those two recipes. I can reproduce them with stock 26.0.90
> pretest, though. Maybe this only happens in optimized builds?
It would be good if you could try in the latest branch HEAD, your
build seems 2 weeks behind it. Then we'd know if the bug was somehow
already fixed.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 12:03:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 29024 <at> debbugs.gnu.org (full text, mbox):
On 27 October 2017 at 09:33, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> Date: Fri, 27 Oct 2017 11:28:47 +0300
>> From: Eli Zaretskii <eliz <at> gnu.org>
>> Cc: Alan Mackenzie <acm <at> muc.de>, 29024 <at> debbugs.gnu.org
>>
>> > From: Richard Copley <rcopley <at> gmail.com>
>> > Date: Fri, 27 Oct 2017 08:40:45 +0100
>> >
>> > #29024 appears to be the same bug as #28926.
>>
>> Strangely enough, with today's emacs-26 branch, I cannot reproduce
>> either of those two recipes. I can reproduce them with stock 26.0.90
>> pretest, though. Maybe this only happens in optimized builds?
>
> It would be good if you could try in the latest branch HEAD, your
> build seems 2 weeks behind it. Then we'd know if the bug was somehow
> already fixed.
>
> Thanks.
Thanks, perhaps so. Not reproducible in my latest build.
(This is built and run on a different computer, using Windows 7
not Windows 10, but I don't suppose that's likely to make a difference.)
In GNU Emacs 26.0.90 (build 1, x86_64-w64-mingw32)
of 2017-10-27 built on [redacted]
Repository revision: 1e9f599b1fe1b25a69a80f5a8e0cb81b789ade82
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Configured using:
'configure --config-cache --with-modules --without-pop 'CFLAGS=-O3
-ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES LCMS2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 12:08:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 29024 <at> debbugs.gnu.org (full text, mbox):
On 27 October 2017 at 13:01, Richard Copley <rcopley <at> gmail.com> wrote:
> On 27 October 2017 at 09:33, Eli Zaretskii <eliz <at> gnu.org> wrote:
> Not reproducible in my latest build.
[...]
> Repository revision: 1e9f599b1fe1b25a69a80f5a8e0cb81b789ade82
That's fsf/emacs-26 53aaad1dfc1f9e0ffe7ee457967426584cd7f541
of Fri Oct 27 01:14:17 2017, plus irrelevant local patches.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 12:22:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 29024 <at> debbugs.gnu.org (full text, mbox):
tags 29024 fixed
close 29024
quit
Richard Copley <rcopley <at> gmail.com> writes:
> On 27 October 2017 at 13:01, Richard Copley <rcopley <at> gmail.com> wrote:
>> On 27 October 2017 at 09:33, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> Not reproducible in my latest build.
> [...]
>> Repository revision: 1e9f599b1fe1b25a69a80f5a8e0cb81b789ade82
> That's fsf/emacs-26 53aaad1dfc1f9e0ffe7ee457967426584cd7f541
> of Fri Oct 27 01:14:17 2017, plus irrelevant local patches.
It's fixed by [1: b7c4aa951c], I can reproduce only with the previous
commit.
[1: b7c4aa951c]: 2017-10-22 14:18:20 +0000
Refactor c-forward-token-2 with new function c-forward-over-token-and-ws.
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=b7c4aa951c8b12629742df9d20d6374c3d2a8ba8>
Added tag(s) fixed.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Fri, 27 Oct 2017 12:22:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
29024 <at> debbugs.gnu.org and Richard Copley <rcopley <at> gmail.com>
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Fri, 27 Oct 2017 12:22:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29024
; Package
emacs
.
(Fri, 27 Oct 2017 13:47:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 29024 <at> debbugs.gnu.org (full text, mbox):
Hello, Eli.
On Fri, Oct 27, 2017 at 11:28:47 +0300, Eli Zaretskii wrote:
> > From: Richard Copley <rcopley <at> gmail.com>
> > Date: Fri, 27 Oct 2017 08:40:45 +0100
> > #29024 appears to be the same bug as #28926.
> Strangely enough, with today's emacs-26 branch, I cannot reproduce
> either of those two recipes. I can reproduce them with stock 26.0.90
> pretest, though. Maybe this only happens in optimized builds?
> Alan, are you looking into this?
I think I fixed it last Sunday (though I haven't checked properly yet),
with the following commit to the emacs-26 branch:
commit b7c4aa951c8b12629742df9d20d6374c3d2a8ba8
Date: Sun Oct 22 14:18:20 2017 +0000
Refactor c-forward-token-2 with new function c-forward-over-token-and-ws.
Use the new function directly in several places where c-forward-token-2
wouldn't move over the last token in the buffer. This caused an infinite loop
in c-restore-<>-properties.
Though, with the benefit of hindsight, the top line of the commit message
wasn't as helpful as it might have been.
Again, regrets that the bug happened at all.
--
Alan Mackenzie (Nuremberg, Germany).
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 25 Nov 2017 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.