GNU bug report logs - #47551
28.0.50; hang in c++ font lock

Previous Next

Package: emacs;

Reported by: Matt Liberty <mliberty <at> eng.ucsd.edu>

Date: Thu, 1 Apr 2021 17:20:01 UTC

Severity: normal

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 47551 in the body.
You can then email your comments to 47551 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#47551; Package emacs. (Thu, 01 Apr 2021 17:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matt Liberty <mliberty <at> eng.ucsd.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 01 Apr 2021 17:20:01 GMT) Full text and rfc822 format available.

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

From: Matt Liberty <mliberty <at> eng.ucsd.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; hang in c++ font lock
Date: Thu, 1 Apr 2021 10:11:03 -0700
[Message part 1 (text/plain, inline)]
If I open the file below and goto-line to line 54 ("X X()") then emacs
hangs.
I sent a SIGUSR2 and I see:
Debugger entered--entering a function:
* #f(compiled-function () #<bytecode 0x1c83247378ca389b>)()
  font-lock-default-fontify-region(1217 1227 nil)
  c-font-lock-fontify-region(1217 1227 nil)
  font-lock-fontify-region(1217 1227)
  #f(compiled-function (fun) #<bytecode
0x1f37dc2e6f385ebe>)(font-lock-fontify-region)
  run-hook-wrapped(#f(compiled-function (fun) #<bytecode
0x1f37dc2e6f385ebe>) font-lock-fontify-region)
  jit-lock--run-functions(1217 1227)
  jit-lock-fontify-now(1217 1717)
  jit-lock-function(1217)
  redisplay_internal\ \(C\ function\)()

Sometimes I can C-g successfully but any attempt to edit the line hangs
again.  If I switch to text-mode before goto-line then there is no hang.

The file is:  (obfuscated)
x(x* x, x* x, x* x, x* x)
{
  ;

  for (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) {
    ;
    if (xxxxxxxxx) {      ;    }
  }

  if (xxxxxxxxxxx > x) {
    xxxxxxxxxxxxx(xxx, xxx,
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    xxxxxxxxxxxxxxx;
  }

  xxxxxxxxxxxxxxxxxxxxxxxxxxxx;
}

xxxx xxxxxxxxxxxxxxxxxxxxxxxxx(xxxxxxxxxxxxxxxx* xxxxx, xxxxxxxxxxxx&
xxxxxxx)
{
  xxxxxxxxxxxxxxxxxxx;
  if (xxxxxxxxxxxxxxxx) {
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    for (xxxxxxxxxxxxxxxxx) {
      if (xxxxxxxxxxxxxxxxxxxx) {
        xxxxxxxx;
      }
      xxxxxxxxxxxxxxxx(
          {xxxxxxxxxxxxxx, xxxxxxxxxxxxxxxx, xxxxxxxxxxxxxxx,
xxxxxxxxxxxxx});
    }
  }

  if (!xxxx) {
    xxxxxx;
  }

  xxxxxxxx = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
  if (xxxxxxxx < 0) {
    xxxxxx;
  }

  for (xxxxx xxxx& xx : xxxx) {
    if (xxxxxxxxxxxxxxxx != xxxxxxxx) {
      xxxxxxxx;
    }
    xxxx xxxxx = xxxxxxxxxxxxxx ? xxxxxxxxxxxxxxxxxxx : xxxxxxxxxxxxxxxxx;
    xxxxxxxxxxxxxx(xxxxx, /* xxxxxxxx */ xxxx);

    xxxxxxx xx = xxxxxxxxxxxxx;
    xxxxxxxxxxxxxxxx({xxxxxx - xx, xxxxxx - xx}, {xxxxxx + xx, xxxxxx +
xx});
    xxxxxxxxxxxxxxxx({xxxxxx - xx, xxxxxx + xx}, {xxxxxx + xx, xxxxxx -
xx});
  }
}

x x()
{
}



In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30,
cairo version 1.15.12)
 of 2021-03-16 built on or-3.ucsd.edu
Repository revision: f5e1fc371af7a4211ca7a40b5db0b7da00cb1d93
Repository branch: heads/emacs-27.1
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: CentOS Linux 7 (Core)

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG MODULES
NOTIFY INOTIFY PDUMPER PNG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11
XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: C
  locale-coding-system: nil

Major mode: Lisp

Minor modes in effect:
  display-time-mode: t
  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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map text-property-search seq byte-opt gv bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time-date subr-x help-fns radix-tree
cl-print debug backtrace help-mode find-func vc-git diff-mode easy-mmode
vc-dispatcher cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs jka-compr cmake-mode thingatpt
derived rx info ange-ftp comint ansi-color ring edmacro kmacro
cl-loaddefs cl-lib time iso-transl tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type 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 elisp-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 facemenu
font-core term/tty-colors frame minibuffer 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
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 93647 5709)
 (symbols 48 11517 1)
 (strings 32 32919 1212)
 (string-bytes 1 1168442)
 (vectors 16 19248)
 (vector-slots 8 243569 8479)
 (floats 8 46 121)
 (intervals 56 508 0)
 (buffers 992 14)
 (heap 1024 14660 1081))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47551; Package emacs. (Thu, 01 Apr 2021 18:36:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matt Liberty <mliberty <at> eng.ucsd.edu>
Cc: 47551 <at> debbugs.gnu.org
Subject: Re: bug#47551: 28.0.50; hang in c++ font lock
Date: Thu, 01 Apr 2021 21:34:32 +0300
> Date: Thu, 1 Apr 2021 10:11:03 -0700
> From:  Matt Liberty via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> If I open the file below and goto-line to line 54 ("X X()") then emacs hangs.
> I sent a SIGUSR2 and I see:
> Debugger entered--entering a function:
> * #f(compiled-function () #<bytecode 0x1c83247378ca389b>)()
>   font-lock-default-fontify-region(1217 1227 nil)
>   c-font-lock-fontify-region(1217 1227 nil)
>   font-lock-fontify-region(1217 1227)
>   #f(compiled-function (fun) #<bytecode 0x1f37dc2e6f385ebe>)(font-lock-fontify-region)
>   run-hook-wrapped(#f(compiled-function (fun) #<bytecode 0x1f37dc2e6f385ebe>) font-lock-fontify-region)
>   jit-lock--run-functions(1217 1227)
>   jit-lock-fontify-now(1217 1717)
>   jit-lock-function(1217)
>   redisplay_internal\ \(C\ function\)()

Your build is from a relatively old repository, so please update and
try again.  I think this could have been fixed recently.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47551; Package emacs. (Sat, 08 May 2021 11:52:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 47551 <at> debbugs.gnu.org, Matt Liberty <mliberty <at> eng.ucsd.edu>
Subject: Re: bug#47551: 28.0.50; hang in c++ font lock
Date: Sat, 08 May 2021 13:50:55 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Your build is from a relatively old repository, so please update and
> try again.  I think this could have been fixed recently.

No response was given within a few months, so I'm closing this bug
report.  If the problem still exists, please respond to this email and
we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 47551 <at> debbugs.gnu.org and Matt Liberty <mliberty <at> eng.ucsd.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 08 May 2021 11:52: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, 06 Jun 2021 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 297 days ago.

Previous Next


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