GNU bug report logs -
#34186
26.1; locking up
Previous Next
Reported by: Michael Menefee <mpmenefee <at> gmail.com>
Date: Thu, 24 Jan 2019 02:47:02 UTC
Severity: normal
Found in version 26.1
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 34186 in the body.
You can then email your comments to 34186 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#34186
; Package
emacs
.
(Thu, 24 Jan 2019 02:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Michael Menefee <mpmenefee <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 24 Jan 2019 02:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Editing a C header file, I type
'#define AVL_iter(' and it locks up consistently and has to be killed
from another terminal, with CPU at 100%.
In GNU Emacs 26.1 (build 1, amd64-portbld-freebsd11.2)
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
avl.h has auto save data; consider M-x recover-this-file
Making completion list...
Configured using:
'configure --disable-build-details --localstatedir=/var
--with-gameuser=games:games --with-sound=no --without-cairo
--without-dbus --without-gconf --without-gif --without-gsettings
--with-x-toolkit=no --without-jpeg --without-lcms2 --without-m17n-flt
--without-imagemagick --without-libotf --without-png
--without-toolkit-scroll-bars --without-rsvg --without-tiff --without-x
--without-xim --without-xpm --without-xwidgets --enable-acl
--without-cairo --without-dbus --without-gconf --without-gif
--with-gnutls --without-gsettings --without-jpeg --with-json
--with-file-notification=kqueue --without-lcms2 --without-m17n-flt
--without-imagemagick --with-mailutils --with-modules --without-libotf
--without-png --without-toolkit-scroll-bars --without-rsvg
--with-threads --without-tiff --without-xft --without-xim --with-xml2
--without-xpm --without-xwidgets --with-x-toolkit=no
--prefix=/usr/local --mandir=/usr/local/man --disable-silent-rules
--infodir=/usr/local/share/emacs/info/
--build=amd64-portbld-freebsd11.2 'CFLAGS=-O2 -pipe -fstack-protector
-isystem /usr/local/include -fno-strict-aliasing ' 'CPPFLAGS=-isystem
/usr/local/include' 'LDFLAGS= -fstack-protector -L/usr/local/lib ''
Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB MODULES THREADS
Important settings:
locale-coding-system: nil
Major mode: C/*l
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
mml-sec password-cache epa derived epg epg-config gnus-util rmail
tool-bar 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 cc-mode cc-fonts easymenu cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt
cl-loaddefs cl-lib term/xterm xterm time-date elec-pair disp-table
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select 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 kqueue multi-tty make-network-process emacs)
Memory information:
((conses 16 113912 7715)
(symbols 48 21664 1)
(miscs 40 37 117)
(strings 32 33281 1470)
(string-bytes 1 1017633)
(vectors 16 14418)
(vector-slots 8 469218 6278)
(floats 8 50 318)
(intervals 56 522 258)
(buffers 992 13))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34186
; Package
emacs
.
(Thu, 24 Jan 2019 14:47:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 34186 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Menefee <mpmenefee <at> gmail.com>
> Date: Wed, 23 Jan 2019 10:24:09 -0600
>
> Editing a C header file, I type
> '#define AVL_iter(' and it locks up consistently and has to be killed
> from another terminal, with CPU at 100%.
I cannot reproduce this. Does the buffer contain anything else in
addition to the text you've shown? Does it happen in "emacs -Q"?
I invoked "emacs -Q", then typed
C-x C-f headerhang.h
#define AVL_iter(
At that point, Emacs was responsive as I'd expect. Are you doing the
same to reproduce the problem?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34186
; Package
emacs
.
(Thu, 24 Jan 2019 16:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 34186 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I narrowed it down to a "#define anything(" as the last line in the buffer
will consistently lock up for me. I'm sure it's the c mode not resolving
something right. I will experiment more and send you the results if I can
reproduce with minimal buffer content.
Thanks
On Thu, Jan 24, 2019, 8:46 AM Eli Zaretskii <eliz <at> gnu.org wrote:
> > From: Michael Menefee <mpmenefee <at> gmail.com>
> > Date: Wed, 23 Jan 2019 10:24:09 -0600
> >
> > Editing a C header file, I type
> > '#define AVL_iter(' and it locks up consistently and has to be killed
> > from another terminal, with CPU at 100%.
>
> I cannot reproduce this. Does the buffer contain anything else in
> addition to the text you've shown? Does it happen in "emacs -Q"?
>
> I invoked "emacs -Q", then typed
>
> C-x C-f headerhang.h
> #define AVL_iter(
>
> At that point, Emacs was responsive as I'd expect. Are you doing the
> same to reproduce the problem?
>
> Thanks.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34186
; Package
emacs
.
(Thu, 24 Jan 2019 16:34:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 34186 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I have found the minimum necessary to consistently reproduce. copy/paste
this into *something.c* to see if you get same results:
void *AVL_first(AVL_t *);
void *AVL_last(AVL_t *);
#define (<--- locks up with pressing open parenthesis
Thanks
On Thu, Jan 24, 2019 at 8:53 AM Michael Menefee <mpmenefee <at> gmail.com> wrote:
> Hi,
>
> I narrowed it down to a "#define anything(" as the last line in the buffer
> will consistently lock up for me. I'm sure it's the c mode not resolving
> something right. I will experiment more and send you the results if I can
> reproduce with minimal buffer content.
>
> Thanks
>
> On Thu, Jan 24, 2019, 8:46 AM Eli Zaretskii <eliz <at> gnu.org wrote:
>
>> > From: Michael Menefee <mpmenefee <at> gmail.com>
>> > Date: Wed, 23 Jan 2019 10:24:09 -0600
>> >
>> > Editing a C header file, I type
>> > '#define AVL_iter(' and it locks up consistently and has to be killed
>> > from another terminal, with CPU at 100%.
>>
>> I cannot reproduce this. Does the buffer contain anything else in
>> addition to the text you've shown? Does it happen in "emacs -Q"?
>>
>> I invoked "emacs -Q", then typed
>>
>> C-x C-f headerhang.h
>> #define AVL_iter(
>>
>> At that point, Emacs was responsive as I'd expect. Are you doing the
>> same to reproduce the problem?
>>
>> Thanks.
>>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34186
; Package
emacs
.
(Thu, 24 Jan 2019 17:42:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 34186 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Menefee <mpmenefee <at> gmail.com>
> Date: Thu, 24 Jan 2019 10:32:34 -0600
> Cc: 34186 <at> debbugs.gnu.org
>
> I have found the minimum necessary to consistently reproduce. copy/paste this into something.c to see if you
> get same results:
>
> void *AVL_first(AVL_t *);
> void *AVL_last(AVL_t *);
> #define (<--- locks up with pressing open parenthesis
Thanks, now I can reproduce this. Alan, please take a look.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34186
; Package
emacs
.
(Thu, 24 Jan 2019 18:08:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 34186 <at> debbugs.gnu.org (full text, mbox):
Hello, Eli.
On Thu, Jan 24, 2019 at 19:41:21 +0200, Eli Zaretskii wrote:
> > From: Michael Menefee <mpmenefee <at> gmail.com>
> > Date: Thu, 24 Jan 2019 10:32:34 -0600
> > Cc: 34186 <at> debbugs.gnu.org
> > I have found the minimum necessary to consistently reproduce. copy/paste this into something.c to see if you
> > get same results:
> > void *AVL_first(AVL_t *);
> > void *AVL_last(AVL_t *);
> > #define (<--- locks up with pressing open parenthesis
> Thanks, now I can reproduce this. Alan, please take a look.
Will do!
Just as a matter of interest, it is not the same bug as #33784 (which
only occurred in the master branch).
--
Alan Mackenzie (Nuremberg, Germany).
Reply sent
to
Alan Mackenzie <acm <at> muc.de>
:
You have taken responsibility.
(Fri, 25 Jan 2019 16:31:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Michael Menefee <mpmenefee <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 25 Jan 2019 16:31:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 34186-done <at> debbugs.gnu.org (full text, mbox):
Hello, Eli and Michael.
On Thu, Jan 24, 2019 at 19:41:21 +0200, Eli Zaretskii wrote:
> > From: Michael Menefee <mpmenefee <at> gmail.com>
> > Date: Thu, 24 Jan 2019 10:32:34 -0600
> > Cc: 34186 <at> debbugs.gnu.org
> > I have found the minimum necessary to consistently reproduce. copy/paste this into something.c to see if you
> > get same results:
> > void *AVL_first(AVL_t *);
> > void *AVL_last(AVL_t *);
> > #define (<--- locks up with pressing open parenthesis
> Thanks, now I can reproduce this. Alan, please take a look.
I've committed the following fix to the emacs-26 branch. I'm closing
the bug.
@Michael: This patch should apply cleanly to your Emacs 26.1 version (in
directory .../emacs/lisp/progmodes). If you apply it, please
byte-compile the file before using it. (If you want any help with the
patching and/or byte-compiling, feel free to send me private email.)
commit 9078f34e84178553cd59bc03ac1b58cb56038436
Author: Alan Mackenzie <acm <at> muc.de>
Date: Fri Jan 25 16:14:00 2019 +0000
Fix a loop in c-fl-decl-start. This fixes bug #34186.
* lisp/progmodes/cc-mode.el (c-fl-decl-start) In the pair of operations
c-syntactic-skip-backward and c-forward-syntactic-ws, ensure the latter
doesn't come back to the position before the former, and break out of the
enclosing loop if it does.
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 8cbb4e8612..5283cfea6e 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1487,6 +1487,7 @@ c-fl-decl-start
;; lock context (etc.) fontification.
(goto-char pos)
(let ((lit-start (c-literal-start))
+ old-pos
(new-pos pos)
capture-opener
bod-lim bo-decl)
@@ -1509,12 +1510,14 @@ c-fl-decl-start
(while
;; Go to a less nested declaration each time round this loop.
(and
+ (setq old-pos (point))
(c-syntactic-skip-backward "^;{}" bod-lim t)
(> (point) bod-lim)
(progn (c-forward-syntactic-ws)
;; Have we got stuck in a comment at EOB?
(not (and (eobp)
(c-literal-start))))
+ (< (point) old-pos)
(progn (setq bo-decl (point))
(or (not (looking-at c-protection-key))
(c-forward-keyword-clause 1)))
--
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, 23 Feb 2019 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 113 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.