unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Matt Liberty via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 47551@debbugs.gnu.org
Subject: bug#47551: 28.0.50; hang in c++ font lock
Date: Thu, 1 Apr 2021 10:11:03 -0700	[thread overview]
Message-ID: <CALcHu8Wpg0b1H59e9hwzAjTEAV9SJ_XqrTPHeBVqfH8HOM-t+w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5213 bytes --]

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))

[-- Attachment #2: Type: text/html, Size: 5916 bytes --]

             reply	other threads:[~2021-04-01 17:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 17:11 Matt Liberty via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-04-01 18:34 ` bug#47551: 28.0.50; hang in c++ font lock Eli Zaretskii
2021-05-08 11:50   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALcHu8Wpg0b1H59e9hwzAjTEAV9SJ_XqrTPHeBVqfH8HOM-t+w@mail.gmail.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=47551@debbugs.gnu.org \
    --cc=mliberty@eng.ucsd.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).