Create a file /tmp/Foo.java with the following content:
class Foo {
=C2=A0 =C2=A0 void func(A<B<C>>> a, A<B<C>>> =
b, A<B<C>>> c, A<B<C>>> d, A<B<C>>=
;> e, A<B<C>>> f, A<B<C>>> g, A<B<C&=
gt;>> h, A<B<C>>> i, A<B<C>>> j, A<B=
<C>>> k) {}
}
Then open that file:
emacs -Q /tmp/Foo.java
Emacs hangs.=C2=A0 C-g also doesn't work.=C2=A0 GDB shows the culprit i=
s a
recursive invocation of
"c-forward-<>-arglist-recur" (0x29dd1f00)
"c-forward-<>-arglist" (0x29dd2530)
"c-forward-name" (0x29dd2d40)
"c-forward-type" (0x29dd3750)
The actual top of the stack is often GC or a regex match.
Seems the parsing of generic arguments has some exponential behavior.
This is a regression since 24.3, where editing such files has no
noticeable delay.
I've tried lowering font-lock-maximum-decoration, it also doesn=
39;t appear to help. Even at level 1 Emacs hangs.
=
In general I've got quite a few reports about hangs and slowness in new=
er versions of CC-Mode. Please make sure it never hangs, if necessary by re=
moving the more complex parsing algorithms and adding hard timeouts to font=
locking.