GNU bug report logs - #55771
29.0.50; cc-mode based uninterruptible infloop

Previous Next

Package: cc-mode;

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

Date: Thu, 2 Jun 2022 18:27:01 UTC

Severity: normal

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 55771 in the body.
You can then email your comments to 55771 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#55771; Package emacs. (Thu, 02 Jun 2022 18:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Welsh Duggan <md5i <at> md5i.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 Jun 2022 18:27:02 GMT) Full text and rfc822 format available.

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

From: Michael Welsh Duggan <md5i <at> md5i.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; cc-mode based uninterruptible infloop
Date: Thu, 02 Jun 2022 14:26:08 -0400
[Message part 1 (text/plain, inline)]
Create a directory containing the following two files:

.dir-locals.el
[.dir-locals.el (application/emacs-lisp, attachment)]
[Message part 3 (text/plain, inline)]
bug.el
[bug.hpp (text/x-c++hdr, attachment)]
[Message part 5 (text/plain, inline)]
From that directory, run "emacs -Q bug.hpp".

The result is an inflooping emacs from which `C-g' and `ESC ESC ESC'
seem to do nothing useful.

I stopped it in the debugger and ran `fin' several times, interspersing
with `xbacktrace' calls until `fin` did not return.  The result is
copied herein:

Starting program: /home/md5i/src/emacs/build/src/emacs -Q bug.hpp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee55e640 (LWP 3028629)]
[New Thread 0x7fffedcf5640 (LWP 3028636)]
[New Thread 0x7fffed4f4640 (LWP 3028637)]

Thread 1 "emacs" received signal SIGTSTP, Stopped (user).
process_mark_stack (base_sp=0) at ../../md5i/src/alloc.c:6735
6735	      void *po = XPNTR (obj);
"Automatic GC" (0x0)
0x5658b1c0 PVEC_COMPILED
"c-forward-sws" (0xffff7740)
"c-forward-over-token-and-ws" (0xffff7898)
"c-forward-token-2" (0xffff79e8)
"c-forward-noise-clause" (0xffff7b40)
"c-forward-declarator" (0xffff7ca8)
"c-fl-decl-end" (0xffff7de8)
"c-context-expand-fl-region" (0xee5920a8)
0x56429cf0 PVEC_COMPILED
"c-before-context-fl-expand-region" (0xffff82a8)
"c-font-lock-fontify-region" (0xffff8438)
"font-lock-fontify-region" (0xee592040)
0x55e86658 PVEC_COMPILED
"jit-lock--run-functions" (0xffff88b8)
"jit-lock-fontify-now" (0xffff8a58)
"jit-lock-function" (0xffff8ba8)
"redisplay_internal (C function)" (0x0)
Run till exit from #0  process_mark_stack (base_sp=0)
    at ../../md5i/src/alloc.c:6735
0x0000555555730efa in mark_object (obj=XIL(0x7d40)) at ../../md5i/src/alloc.c:7025
7025	}
Run till exit from #0  0x0000555555730efa in mark_object (obj=XIL(0x7d40))
    at ../../md5i/src/alloc.c:7025
0x00005555557310ca in mark_object_root_visitor (root_ptr=<optimized out>, type=<optimized out>, data=<optimized out>) at ../../md5i/src/alloc.c:5978
5978	}
Run till exit from #0  0x00005555557310ca in mark_object_root_visitor (
    root_ptr=<optimized out>, type=<optimized out>, data=<optimized out>)
    at ../../md5i/src/alloc.c:5978
visit_vectorlike_root (visitor=..., ptr=0x555555c57c00 <buffer_defaults>, type=GC_ROOT_BUFFER_LOCAL_DEFAULT) at ../../md5i/src/alloc.c:5927
5927	  for (i = 0; i < size; i++)
Run till exit from #0  visit_vectorlike_root (visitor=..., 
    ptr=0x555555c57c00 <buffer_defaults>, type=GC_ROOT_BUFFER_LOCAL_DEFAULT)
    at ../../md5i/src/alloc.c:5927
0x000055555572aed3 in visit_buffer_root (visitor=..., buffer=<optimized out>, type=<optimized out>) at ../../md5i/src/alloc.c:5944
5944	}
Run till exit from #0  0x000055555572aed3 in visit_buffer_root (visitor=..., 
    buffer=<optimized out>, type=<optimized out>)
    at ../../md5i/src/alloc.c:5944
visit_static_gc_roots (visitor=...) at ../../md5i/src/alloc.c:5958
5958	  visit_buffer_root (visitor,
Run till exit from #0  visit_static_gc_roots (visitor=...)
    at ../../md5i/src/alloc.c:5958
garbage_collect () at ../../md5i/src/alloc.c:6181
6181	  mark_pinned_objects ();
Run till exit from #0  garbage_collect () at ../../md5i/src/alloc.c:6181
0x00005555557316b1 in maybe_garbage_collect () at ../../md5i/src/alloc.c:6089
6089	}
Run till exit from #0  0x00005555557316b1 in maybe_garbage_collect ()
    at ../../md5i/src/alloc.c:6089
0x0000555555754fa1 in maybe_gc () at ../../md5i/src/lisp.h:5530
5530	    maybe_garbage_collect ();
Run till exit from #0  0x0000555555754fa1 in maybe_gc ()
    at ../../md5i/src/lisp.h:5530
Ffuncall (nargs=nargs <at> entry=1, args=args <at> entry=0x7fffffff74f8) at ../../md5i/src/eval.c:2940
2940	  if (debug_on_next_call)
Run till exit from #0  Ffuncall (nargs=nargs <at> entry=1, 
    args=args <at> entry=0x7fffffff74f8) at ../../md5i/src/eval.c:2940
0x000055555579fc3b in bcall0 (f=<optimized out>) at ../../md5i/src/comp.c:844
844	}
Value returned is $1 = (struct Lisp_X *) 0x0
Run till exit from #0  0x000055555579fc3b in bcall0 (f=<optimized out>)
    at ../../md5i/src/comp.c:844
do_one_unbind (this_binding=this_binding <at> entry=0x7fffffff7540, unwinding=unwinding <at> entry=true, bindflag=bindflag <at> entry=SET_INTERNAL_UNBIND) at ../../md5i/src/eval.c:3570
3570	      break;
Run till exit from #0  do_one_unbind (
    this_binding=this_binding <at> entry=0x7fffffff7540, 
    unwinding=unwinding <at> entry=true, 
    bindflag=bindflag <at> entry=SET_INTERNAL_UNBIND) at ../../md5i/src/eval.c:3570
unbind_to (count=..., value=value <at> entry=XIL(0)) at ../../md5i/src/eval.c:3698
3698	  while (specpdl_ptr != specpdl_ref_to_ptr (count))
Run till exit from #0  unbind_to (count=..., value=value <at> entry=XIL(0))
    at ../../md5i/src/eval.c:3698
0x00005555557a1017 in helper_unbind_n (n=<optimized out>) at ../../md5i/src/comp.c:4988
4988	}
Value returned is $2 = (struct Lisp_X *) 0x0
Run till exit from #0  0x00005555557a1017 in helper_unbind_n (
    n=<optimized out>) at ../../md5i/src/comp.c:4988
0x00007fffec8e8345 in F632d666f72776172642d737773_c_forward_sws_0 () from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
Value returned is $3 = (struct Lisp_X *) 0x0
Run till exit from #0  0x00007fffec8e8345 in F632d666f72776172642d737773_c_forward_sws_0 ()
   from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
0x0000555555756b79 in funcall_subr (subr=0x5555562f6aa0, numargs=numargs <at> entry=0, args=args <at> entry=0x7fffffff7740) at ../../md5i/src/eval.c:2979
2979		      return subr->function.a0 ();
"c-forward-sws" (0xffff7740)
"c-forward-over-token-and-ws" (0xffff7898)
"c-forward-token-2" (0xffff79e8)
"c-forward-noise-clause" (0xffff7b40)
"c-forward-declarator" (0xffff7ca8)
"c-fl-decl-end" (0xffff7de8)
"c-context-expand-fl-region" (0xee5920a8)
0x56429cf0 PVEC_COMPILED
"c-before-context-fl-expand-region" (0xffff82a8)
"c-font-lock-fontify-region" (0xffff8438)
"font-lock-fontify-region" (0xee592040)
0x55e86658 PVEC_COMPILED
"jit-lock--run-functions" (0xffff88b8)
"jit-lock-fontify-now" (0xffff8a58)
"jit-lock-function" (0xffff8ba8)
"redisplay_internal (C function)" (0x0)
Run till exit from #0  0x0000555555756b79 in funcall_subr (
    subr=0x5555562f6aa0, numargs=numargs <at> entry=0, 
    args=args <at> entry=0x7fffffff7740) at ../../md5i/src/eval.c:2979
0x0000555555754a9e in funcall_general (fun=<optimized out>, numargs=numargs <at> entry=0, args=args <at> entry=0x7fffffff7740) at ../../md5i/src/eval.c:2889
2889	    return funcall_subr (XSUBR (fun), numargs, args);
Value returned is $4 = (struct Lisp_X *) 0x0
Run till exit from #0  0x0000555555754a9e in funcall_general (
    fun=<optimized out>, numargs=numargs <at> entry=0, 
    args=args <at> entry=0x7fffffff7740) at ../../md5i/src/eval.c:2889
Ffuncall (nargs=1, args=0x7fffffff7738) at ../../md5i/src/eval.c:2945
2945	  lisp_eval_depth--;
Value returned is $5 = (struct Lisp_X *) 0x0
Run till exit from #0  Ffuncall (nargs=1, args=0x7fffffff7738)
    at ../../md5i/src/eval.c:2945
0x00007fffec8f9b11 in F632d666f72776172642d6f7665722d746f6b656e2d616e642d7773_c_forward_over_token_and_ws_0 () from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
Value returned is $6 = (struct Lisp_X *) 0x0
Run till exit from #0  0x00007fffec8f9b11 in F632d666f72776172642d6f7665722d746f6b656e2d616e642d7773_c_forward_over_token_and_ws_0 ()
   from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
0x0000555555756b84 in funcall_subr (subr=0x5555560c2418, numargs=numargs <at> entry=1, args=args <at> entry=0x7fffffff7898) at ../../md5i/src/eval.c:2981
2981		      return subr->function.a1 (a[0]);
Run till exit from #0  0x0000555555756b84 in funcall_subr (
    subr=0x5555560c2418, numargs=numargs <at> entry=1, 
    args=args <at> entry=0x7fffffff7898) at ../../md5i/src/eval.c:2981
0x0000555555754a9e in funcall_general (fun=<optimized out>, numargs=numargs <at> entry=1, args=args <at> entry=0x7fffffff7898) at ../../md5i/src/eval.c:2889
2889	    return funcall_subr (XSUBR (fun), numargs, args);
Value returned is $7 = (struct Lisp_X *) 0x30
Run till exit from #0  0x0000555555754a9e in funcall_general (
    fun=<optimized out>, numargs=numargs <at> entry=1, 
    args=args <at> entry=0x7fffffff7898) at ../../md5i/src/eval.c:2889
Ffuncall (nargs=2, args=0x7fffffff7890) at ../../md5i/src/eval.c:2945
2945	  lisp_eval_depth--;
Value returned is $8 = (struct Lisp_X *) 0x30
Run till exit from #0  Ffuncall (nargs=2, args=0x7fffffff7890)
    at ../../md5i/src/eval.c:2945
0x00007fffec8f9e06 in F632d666f72776172642d746f6b656e2d32_c_forward_token_2_0 () from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
Value returned is $9 = (struct Lisp_X *) 0x30
Run till exit from #0  0x00007fffec8f9e06 in F632d666f72776172642d746f6b656e2d32_c_forward_token_2_0 ()
   from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
0x0000555555756ba6 in funcall_subr (subr=0x5555560c2470, numargs=numargs <at> entry=0, args=args <at> entry=0x7fffffff79e8) at ../../md5i/src/eval.c:2985
2985		      return subr->function.a3 (a[0], a[1], a[2]);
"c-forward-token-2" (0xffff79e8)
"c-forward-noise-clause" (0xffff7b40)
"c-forward-declarator" (0xffff7ca8)
"c-fl-decl-end" (0xffff7de8)
"c-context-expand-fl-region" (0xee5920a8)
0x56429cf0 PVEC_COMPILED
"c-before-context-fl-expand-region" (0xffff82a8)
"c-font-lock-fontify-region" (0xffff8438)
"font-lock-fontify-region" (0xee592040)
0x55e86658 PVEC_COMPILED
"jit-lock--run-functions" (0xffff88b8)
"jit-lock-fontify-now" (0xffff8a58)
"jit-lock-function" (0xffff8ba8)
"redisplay_internal (C function)" (0x0)
Run till exit from #0  0x0000555555756ba6 in funcall_subr (
    subr=0x5555560c2470, numargs=numargs <at> entry=0, 
    args=args <at> entry=0x7fffffff79e8) at ../../md5i/src/eval.c:2985
0x0000555555754a9e in funcall_general (fun=<optimized out>, numargs=numargs <at> entry=0, args=args <at> entry=0x7fffffff79e8) at ../../md5i/src/eval.c:2889
2889	    return funcall_subr (XSUBR (fun), numargs, args);
Value returned is $10 = (struct Lisp_X *) 0x6
Run till exit from #0  0x0000555555754a9e in funcall_general (
    fun=<optimized out>, numargs=numargs <at> entry=0, 
    args=args <at> entry=0x7fffffff79e8) at ../../md5i/src/eval.c:2889
Ffuncall (nargs=1, args=0x7fffffff79e0) at ../../md5i/src/eval.c:2945
2945	  lisp_eval_depth--;
Value returned is $11 = (struct Lisp_X *) 0x6
Run till exit from #0  Ffuncall (nargs=1, args=0x7fffffff79e0)
    at ../../md5i/src/eval.c:2945
0x00007fffec91187a in F632d666f72776172642d6e6f6973652d636c61757365_c_forward_noise_clause_0 () from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
Value returned is $12 = (struct Lisp_X *) 0x6
Run till exit from #0  0x00007fffec91187a in F632d666f72776172642d6e6f6973652d636c61757365_c_forward_noise_clause_0 ()
   from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
0x0000555555756b79 in funcall_subr (subr=0x555555ec5660, numargs=numargs <at> entry=0, args=args <at> entry=0x7fffffff7b40) at ../../md5i/src/eval.c:2979
2979		      return subr->function.a0 ();
"c-forward-noise-clause" (0xffff7b40)
"c-forward-declarator" (0xffff7ca8)
"c-fl-decl-end" (0xffff7de8)
"c-context-expand-fl-region" (0xee5920a8)
0x56429cf0 PVEC_COMPILED
"c-before-context-fl-expand-region" (0xffff82a8)
"c-font-lock-fontify-region" (0xffff8438)
"font-lock-fontify-region" (0xee592040)
0x55e86658 PVEC_COMPILED
"jit-lock--run-functions" (0xffff88b8)
"jit-lock-fontify-now" (0xffff8a58)
"jit-lock-function" (0xffff8ba8)
"redisplay_internal (C function)" (0x0)
Run till exit from #0  0x0000555555756b79 in funcall_subr (
    subr=0x555555ec5660, numargs=numargs <at> entry=0, 
    args=args <at> entry=0x7fffffff7b40) at ../../md5i/src/eval.c:2979
0x0000555555754a9e in funcall_general (fun=<optimized out>, numargs=numargs <at> entry=0, args=args <at> entry=0x7fffffff7b40) at ../../md5i/src/eval.c:2889
2889	    return funcall_subr (XSUBR (fun), numargs, args);
Value returned is $13 = (struct Lisp_X *) 0x30
Run till exit from #0  0x0000555555754a9e in funcall_general (
    fun=<optimized out>, numargs=numargs <at> entry=0, 
    args=args <at> entry=0x7fffffff7b40) at ../../md5i/src/eval.c:2889
Ffuncall (nargs=1, args=0x7fffffff7b38) at ../../md5i/src/eval.c:2945
2945	  lisp_eval_depth--;
Value returned is $14 = (struct Lisp_X *) 0x30
Run till exit from #0  Ffuncall (nargs=1, args=0x7fffffff7b38)
    at ../../md5i/src/eval.c:2945
0x00007fffec91d397 in F632d666f72776172642d6465636c617261746f72_c_forward_declarator_0 () from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln
Value returned is $15 = (struct Lisp_X *) 0x30
Run till exit from #0  0x00007fffec91d397 in F632d666f72776172642d6465636c617261746f72_c_forward_declarator_0 ()
   from /home/md5i/.config/emacs/eln-cache/29.0.50-0e65c843/cc-engine-ccfcb170-09002edc.eln



In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0)
 of 2022-06-02 built on miko
Repository revision: 8f279c8666dc642ed1f8f49aa709530fcea47374
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid
 --with-native-compilation --with-xinput2 'CFLAGS=-Og -ggdb''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF X11
XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  flyspell-mode: t
  display-time-mode: t
  magit-wip-initial-backup-mode: t
  magit-wip-before-change-mode: t
  magit-wip-after-apply-mode: t
  magit-wip-after-save-mode: t
  magit-wip-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-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
  line-number-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/md5i/.config/emacs/elpa/transient-20220514.945/transient hides /home/md5i/src/emacs/md5i/lisp/transient

Features:
(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file url-dired svg
gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud gnus-spec gnus-win
emacsbug flyspell ispell view pacproxy descr-text tramp tramp-loaddefs
trampver tramp-integration cus-edit pp cus-load files-x tramp-compat
parse-time iso8601 ls-lisp time sieve-manage sasl sasl-anonymous
sasl-login sasl-plain rng-loc rng-uri rng-parse rng-match rng-dt
rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util
sgml-mode facemenu dom python ps-print ps-print-loaddefs ps-def lpr
picture nm dbus xml magit-submodule magit-obsolete magit-blame
magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch
magit-clone magit-remote magit-commit magit-sequence magit-notes
magit-worktree magit-tag magit-merge magit-branch magit-reset
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log which-func imenu magit-diff smerge-mode diff
diff-mode easy-mmode git-commit log-edit pcvs-util add-log magit-core
magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process with-editor shell pcomplete server magit-mode transient
comp comp-cstr warnings rx cl-extra edmacro kmacro help-mode magit-git
magit-base magit-section format-spec crm dash compat-27 compat-26 compat
nnimap nnmail gnus-int mail-source gnus-range message sendmail
yank-media rfc822 mml mml-sec epa mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader utf7 netrc nnoo gnus wid-edit nnheader
gnus-util time-date mail-utils range gnus-o365-oauth2 oauth2 url-http
url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm rmc puny plstore generated generic-x epg rfc6068
epg-config ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help
ediff-init ediff-util dired-x dired dired-loaddefs compile
text-property-search comint ring ansi-color cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs derived
debian-el info package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice simple cl-generic indonesian
philippine 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
emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help
abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face
macroexp files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 447554 18766)
 (symbols 48 26788 2)
 (strings 32 133201 15134)
 (string-bytes 1 4589077)
 (vectors 16 85150)
 (vector-slots 8 1194859 35646)
 (floats 8 907 430)
 (intervals 56 433 53)
 (buffers 992 15))

-- 
Michael Welsh Duggan
(md5i <at> md5i.com)

bug reassigned from package 'emacs' to 'cc-mode'. Request was from Michael Welsh Duggan <mwd <at> md5i.com> to control <at> debbugs.gnu.org. (Fri, 03 Jun 2022 18:25:02 GMT) Full text and rfc822 format available.

bug No longer marked as found in versions 29.0.50. Request was from Michael Welsh Duggan <mwd <at> md5i.com> to control <at> debbugs.gnu.org. (Fri, 03 Jun 2022 18:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-cc-mode <at> gnu.org:
bug#55771; Package cc-mode. (Tue, 07 Jun 2022 20:46:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Michael Welsh Duggan <mwd <at> md5i.com>
Cc: acm <at> muc.de, 55771 <at> debbugs.gnu.org
Subject: Re: [Michael Welsh Duggan] bug#55771: 29.0.50; cc-mode based
 uninterruptible infloop
Date: Tue, 7 Jun 2022 20:45:02 +0000
Hello, Michael.

On Mon, Jun 06, 2022 at 23:41:05 -0400, Michael Welsh Duggan wrote:
> I just wanted to poke you on this one, as I'm not certain it entered
> your notice due to the shoddy way I submitted it.

Apologies.  I missed it.

[ .... ]

> -------------------- Start of forwarded message --------------------
> Subject: bug#55771: 29.0.50; cc-mode based uninterruptible infloop
> To: 55771 <at> debbugs.gnu.org
> From: Michael Welsh Duggan <md5i <at> md5i.com>
> Date: Thu, 02 Jun 2022 14:26:08 -0400


> Create a directory containing the following two files:

> .dir-locals.el



> bug.el

> #ifndef IPFIX_FLOATPOINT_HPP
> #define IPFIX_FLOATPOINT_HPP
> 
> IPFIX__NEW_NAMESPACE
> 
> #endif  // IPFIX_FLOATPOINT_HPP


> >From that directory, run "emacs -Q bug.hpp".

> The result is an inflooping emacs from which `C-g' and `ESC ESC ESC'
> seem to do nothing useful.

> I stopped it in the debugger and ran `fin' several times, interspersing
> with `xbacktrace' calls until `fin` did not return.  The result is
> copied herein:

[ .... ]

Thanks, that backtrace was extraordinarily helpful.  It was one of these
places where I'd neglected to test the return code of c-forward-token-2.
As a result, point stayed in the same place in a loop which thus became
an infinite loop.

Can I ask you, please, to try out the following patch, and let me know
if it fixes the bug in your real C++ code.

I don't want to commit this yet, since I haven't yet checked CC Mode for
the same bug somewhere else (and it's getting late, here).  I may not
have much time to look at this in the next few days.



diff -r 6057991425e3 cc-engine.el
--- a/cc-engine.el	Tue May 24 16:11:52 2022 +0000
+++ b/cc-engine.el	Tue Jun 07 20:33:41 2022 +0000
@@ -8312,9 +8312,10 @@
 (defun c-forward-noise-clause ()
   ;; Point is at a c-noise-macro-with-parens-names macro identifier.  Go
   ;; forward over this name, any parenthesis expression which follows it, and
-  ;; any syntactic WS, ending up at the next token.  If there is an unbalanced
-  ;; paren expression, leave point at it.  Always Return t.
-  (c-forward-token-2)
+  ;; any syntactic WS, ending up at the next token or EOB.  If there is an
+  ;; unbalanced paren expression, leave point at it.  Always Return t.
+  (or (zerop (c-forward-token-2))
+      (goto-char (point-max)))
   (if (and (eq (char-after) ?\()
 	   (c-go-list-forward))
       (c-forward-syntactic-ws))



> In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0)
>  of 2022-06-02 built on miko
> Repository revision: 8f279c8666dc642ed1f8f49aa709530fcea47374
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
> System Description: Debian GNU/Linux bookworm/sid

> Configured using:
>  'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid
>  --with-native-compilation --with-xinput2 'CFLAGS=-Og -ggdb''

[ .... ]

> -- 
> Michael Welsh Duggan
> (md5i <at> md5i.com)

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-cc-mode <at> gnu.org:
bug#55771; Package cc-mode. (Wed, 08 Jun 2022 04:31:02 GMT) Full text and rfc822 format available.

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

From: Michael Welsh Duggan <mwd <at> md5i.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: Michael Welsh Duggan <mwd <at> md5i.com>, 55771 <at> debbugs.gnu.org
Subject: Re: [Michael Welsh Duggan] bug#55771: 29.0.50; cc-mode based
 uninterruptible infloop
Date: Wed, 08 Jun 2022 00:30:45 -0400
Alan Mackenzie <acm <at> muc.de> writes:

> Can I ask you, please, to try out the following patch, and let me know
> if it fixes the bug in your real C++ code.
>
> I don't want to commit this yet, since I haven't yet checked CC Mode for
> the same bug somewhere else (and it's getting late, here).  I may not
> have much time to look at this in the next few days.

It seems to have fixed this problem.  I'll let you know if I run into
anything else.

> diff -r 6057991425e3 cc-engine.el
> --- a/cc-engine.el	Tue May 24 16:11:52 2022 +0000
> +++ b/cc-engine.el	Tue Jun 07 20:33:41 2022 +0000
> @@ -8312,9 +8312,10 @@
>  (defun c-forward-noise-clause ()
>    ;; Point is at a c-noise-macro-with-parens-names macro identifier.  Go
>    ;; forward over this name, any parenthesis expression which follows it, and
> -  ;; any syntactic WS, ending up at the next token.  If there is an unbalanced
> -  ;; paren expression, leave point at it.  Always Return t.
> -  (c-forward-token-2)
> +  ;; any syntactic WS, ending up at the next token or EOB.  If there is an
> +  ;; unbalanced paren expression, leave point at it.  Always Return t.
> +  (or (zerop (c-forward-token-2))
> +      (goto-char (point-max)))
>    (if (and (eq (char-after) ?\()
>  	   (c-go-list-forward))
>        (c-forward-syntactic-ws))
>
>
>
>> In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0)
>>  of 2022-06-02 built on miko
>> Repository revision: 8f279c8666dc642ed1f8f49aa709530fcea47374
>> Repository branch: master
>> Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
>> System Description: Debian GNU/Linux bookworm/sid
>
>> Configured using:
>>  'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid
>>  --with-native-compilation --with-xinput2 'CFLAGS=-Og -ggdb''
>
> [ .... ]
>
>> -- 
>> Michael Welsh Duggan
>> (md5i <at> md5i.com)

-- 
Michael Welsh Duggan
(md5i <at> md5i.com)




Information forwarded to bug-cc-mode <at> gnu.org:
bug#55771; Package cc-mode. (Wed, 08 Jun 2022 04:50:02 GMT) Full text and rfc822 format available.

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

From: Michael Welsh Duggan <mwd <at> md5i.com>
To: Michael Welsh Duggan <mwd <at> md5i.com>
Cc: Alan Mackenzie <acm <at> muc.de>, 55771 <at> debbugs.gnu.org
Subject: Re: [Michael Welsh Duggan] bug#55771: 29.0.50; cc-mode based
 uninterruptible infloop
Date: Wed, 08 Jun 2022 00:49:08 -0400
Followup question: Is it a bug that there was no way to cancel this loop
with `C-g'?  Or was it being canceled but then immediately restarting?
`M-x toggle-debug-on-quit' didn't trigger, though.

-- 
Michael Welsh Duggan
(md5i <at> md5i.com)




Information forwarded to bug-cc-mode <at> gnu.org:
bug#55771; Package cc-mode. (Sat, 18 Jun 2022 04:43:02 GMT) Full text and rfc822 format available.

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

From: Michael Welsh Duggan <mwd <at> md5i.com>
To: Michael Welsh Duggan <mwd <at> md5i.com>
Cc: Alan Mackenzie <acm <at> muc.de>, 55771 <at> debbugs.gnu.org
Subject: Re: bug#55771: [Michael Welsh Duggan] bug#55771: 29.0.50; cc-mode
 based uninterruptible infloop
Date: Sat, 18 Jun 2022 00:42:50 -0400
Michael Welsh Duggan <mwd <at> md5i.com> writes:

> Followup question: Is it a bug that there was no way to cancel this loop
> with `C-g'?  Or was it being canceled but then immediately restarting?
> `M-x toggle-debug-on-quit' didn't trigger, though.

Ping?

-- 
Michael Welsh Duggan
(md5i <at> md5i.com)




Reply sent to Alan Mackenzie <acm <at> muc.de>:
You have taken responsibility. (Sat, 18 Jun 2022 11:49:02 GMT) Full text and rfc822 format available.

Notification sent to Michael Welsh Duggan <md5i <at> md5i.com>:
bug acknowledged by developer. (Sat, 18 Jun 2022 11:49:02 GMT) Full text and rfc822 format available.

Message #26 received at 55771-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Michael Welsh Duggan <mwd <at> md5i.com>
Cc: acm <at> muc.de, 55771-done <at> debbugs.gnu.org
Subject: Re: bug#55771: [Michael Welsh Duggan] bug#55771: 29.0.50; cc-mode
 based uninterruptible infloop
Date: Sat, 18 Jun 2022 11:47:50 +0000
Hello, Michael.

On Sat, Jun 18, 2022 at 00:42:50 -0400, Michael Welsh Duggan wrote:
> Michael Welsh Duggan <mwd <at> md5i.com> writes:

> > Followup question: Is it a bug that there was no way to cancel this loop
> > with `C-g'?  Or was it being canceled but then immediately restarting?
> > `M-x toggle-debug-on-quit' didn't trigger, though.

> Ping?

Yes.  I had a visitor this week, so had no time for Emacs.  The cause of
the bug was a failure to check the result code from c-forward-token-2,
so I took the time to scan the rest of CC Mode for similar failures to
check that result code, also from c-backward-token-2.  There were around
20 suspicious occurrences, which took some time to check.  In the end
only one of these (in addition to the main one) needed amending.

I committed the fixes to CC Mode and to the savannah master branch this
morning, so I am closing the bug with this post.

> -- 
> Michael Welsh Duggan
> (md5i <at> md5i.com)

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Jul 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 277 days ago.

Previous Next


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