Subject: bug#70423: 29.3; cc-mode hang at 100% cpu and consuming all available memory

From: Robert Weiner <[email-masked]>
Date: Sat, 20 Apr 2024 11:52:49 -0400

Hi all:

I have now read through the recent messages more carefully, duplicated the
hang in c++-mode using pillowtrucker's init.el and his drm_formats.cpp file
simply by invoking M->.  I then added both Alan's cc-defs.el fix and his
new c++-defun-prompt-regexp and that resolved the hang.  If I add the new
c++ regexp without the cc-defs.el fix, that also seems to solve the hang.
So I retract my prior message and acknowledge one source of the problem has
been the existing Hyperbole regexps.  We'll update Hyperbole to use Allen's
new regexps and hopefully this will close this issue after pillowtrucker
does some testing.  (I think Allen's other fixes should be applied to and
that they will help performance).

Regards,

Bob

On Sat, Apr 20, 2024 at 9:14 AM Robert Weiner <[email-masked]> wrote:

>
> > On Apr 20, 2024, at 5:22 AM, Alan Mackenzie <[email-masked]> wrote:
> >
> > Hello, M.
> >
> > Yes, I can understand that.  As I said, I'll fix c-beginning-of-defun-1
> > so that that can't possibly happen again, regardless of what happens to
> > these regexps.
>
> I think this is the crux of the fix needed, not a change in Hyperbole
> regexps.  Alan, Hyperbole had your new defun regexp for Java and Emacs
> still would hang until we applied your recent fix to cc-defs.el.  With that
> in place and no change to the c++ defun regex in Hyperbole, I have not been
> able to trigger a hang.  So let’s just add your additional fix described
> above, skip the c++ defun rewrite and see if any other issues appear.
>
> Cheers,
>
> Bob