Subject: bug#59038: loading this base64 file makes emacs -Q 28.2 peg a core infinitely

From: Eli Zaretskii <[email-masked]>
Date: Sat, 05 Nov 2022 11:28:10 +0200

> Date: Sat, 5 Nov 2022 08:50:33 +0100
> Cc: [email-masked], [email-masked], [email-masked]
> From: Gerd Möllmann <[email-masked]>
> 
> On 05.11.22 08:01, Eli Zaretskii wrote:
> > What is reproducible, exactly?  
> 
> I don't understand.  The infinite loop is reproducible, "pegging one
> core" as he expressed it, using up one CPU core.

Not here, it isn't.

> > Visiting the file is almost
> > instantaneous here, in Emacs 29.  What did you do to get Emacs into an
> > infloop?
> 
> Maybe I switched applications with Cmd-TAB, or something else triggering
> redisplay.  Do a M-x or C-l.

No, that doesn't trigger it.  Only M-> does.

> > It is IMO unreasonable to expect CC Mode to do something sensible with
> > random sequence of characters that don't resemble C in any way.
> 
> I think no-one expects that.  The bug is the uninterruptable loop or 
> whatever causes it.

It's nice to have that fixed, if it isn't too complex, but in general
visiting such a file as C file is not a reasonable thing to do.