GNU bug report logs -
#25679
26.0.50; Emacs hangs for nested generics
Previous Next
Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>
Date: Fri, 10 Feb 2017 19:28:02 UTC
Severity: normal
Found in version 26.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Fr., 10. Feb. 2017 um
20:28 Uhr:
>
> Create a file /tmp/Foo.java with the following content:
>
> class Foo {
> 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>>> h, A<B<C>>> i, A<B<C>>> j, A<B<C>>> k) {}
> }
>
> Then open that file:
>
> emacs -Q /tmp/Foo.java
>
> Emacs hangs. C-g also doesn't work. GDB shows the culprit is 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't appear to
help. Even at level 1 Emacs hangs.
In general I've got quite a few reports about hangs and slowness in newer
versions of CC-Mode. Please make sure it never hangs, if necessary by
removing the more complex parsing algorithms and adding hard timeouts to
font locking.
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.