Subject: bug#77704: 30.1; xml-mode enters infinite loop when saving with unclosed XML comment

From: Eli Zaretskii <[email-masked]>
Date: Sat, 12 Apr 2025 13:34:56 +0300

> Date: Thu, 10 Apr 2025 16:49:25 +0900
> From:  TANIKAWAKoji via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 
> To reproduce:
> 
> 1. emacs -Q
> 2. Open a new buffer and enter: <!--
> 3. Set mode to xml-mode: M-x xml-mode
> 4. Save buffer: C-x C-s
> 
> Expected: Save succeeds, or a warning about unclosed comment.
> 
> Actual: Emacs enters an infinite loop or hangs. Requires external termination.

I cannot reproduce this, neither with the stock Emacs 29.1 nor with
later versions.  Are you sure you are using xml-mode from Emacs?  In
Emacs 29.1, xml-mode is just an alias for nxml-mode.

Maybe this is macOS specific?