GNU bug report logs - #53203
Comment with lots of color codes crashes or hangs emacs in scss-mode

Previous Next

Package: emacs;

Reported by: Colin <my.old.email.sucked <at> gmail.com>

Date: Wed, 12 Jan 2022 08:03:02 UTC

Severity: normal

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Colin <my.old.email.sucked <at> gmail.com>
Cc: 53203 <at> debbugs.gnu.org
Subject: bug#53203: Comment with lots of color codes crashes or hangs emacs in scss-mode
Date: Wed, 12 Jan 2022 15:16:57 +0200
> Date: Wed, 12 Jan 2022 17:20:24 +1000
> From: Colin <my.old.email.sucked <at> gmail.com>
> 
> I have the following snippet in example.scss file:
> 
> ```
> 
> /*
> #ffffff #ffffff
> #ffffff #ffffff
> #ffffff #ffffff
> #ffffff #ffffff
> #ffffff #ffffff
> */
> ```
> 
> On opening the file with emacs -Q (27.1 and a fresh build of git master 
> (29.0.50), emacs hangs.
> 
> If I remove one/two lines, it appears to burn some CPU and then work, so 
> it looks like an exponential search or something.
> 
> For now I'll remove the snippet from my code, but an interesting bug 
> nonetheless ;)

It seems to infloop in JIT font-lock, and the culprit seems to be this
part of font-lock-keywords:

       ;; Even though pseudo-elements should be prefixed by ::, a
       ;; single colon is accepted for backward compatibility.
       "\\(?:\\(:" (regexp-opt (append css-pseudo-class-ids
                                       css-pseudo-element-ids)
                               t)




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

Previous Next


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