bug#42522: Emacs 27: 100% CPU when setting mode-name with ligatures

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#42522: Emacs 27: 100% CPU when setting mode-name with ligatures

Evan Moses-2
Emacs version: GNU Emacs 27.0.91 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G5033)) of 2020-07-24
Built d5acc509415869bce22c49ae311f2960494a0bdc locally


To reproduce, evaluate this

(set-char-table-range composition-function-table 47 '([".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)" 0 font-shape-gstring]))

And then evaluate

(setq mode-name "test//")

Emacs will become unresponsive and consume 100% CPU.

--
Evan Moses
[hidden email]
Reply | Threaded
Open this post in threaded view
|

bug#42522: Emacs 27: 100% CPU when setting mode-name with ligatures

Robert Pluim
>>>>> On Sat, 25 Jul 2020 09:24:47 +0300, Eli Zaretskii <[hidden email]> said:

    >> From: Evan Moses <[hidden email]>
    >> Date: Fri, 24 Jul 2020 14:35:50 -0700
    >>
    >> To reproduce, evaluate this
    >>
    >> (set-char-table-range composition-function-table 47 '([".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)" 0
    >> font-shape-gstring]))
    >>
    >> And then evaluate
    >>
    >> (setq mode-name "test//")
    >>
    >> Emacs will become unresponsive and consume 100% CPU.

    Eli> It doesn't hang here.  Could this be macOS-specific?  Or maybe the
    Eli> problem happens only with some fonts?  Does it happen in "emacs -Q"?

I see this on macOS with -Q, which uses Menlo, but only with emacs-27,
not master.. I do see an 'Attempt to shape unibyte text' message from
emacs-27

Robert



Reply | Threaded
Open this post in threaded view
|

bug#42522: Emacs 27: 100% CPU when setting mode-name with ligatures

Eli Zaretskii
> From: Robert Pluim <[hidden email]>
> Cc: Evan Moses <[hidden email]>,  [hidden email]
> Date: Sat, 25 Jul 2020 19:22:19 +0200
>
>     Eli> It doesn't hang here.  Could this be macOS-specific?  Or maybe the
>     Eli> problem happens only with some fonts?  Does it happen in "emacs -Q"?
>
> I see this on macOS with -Q, which uses Menlo, but only with emacs-27,
> not master.. I do see an 'Attempt to shape unibyte text' message from
> emacs-27

Then I guess the problem is already solved on master.