Subject: 24.3; xml-parse-region stuck on specific input, uses lots of memory
From: Christopher Wellons <[email-masked]>
To: [email-masked]
Date: Sat, 04 Jan 2014 18:39:30 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

The function `xml-parse-region' is never returning from parsing this
specific input. It's saturing a CPU core while using huge quantities of
memory. Fortunately it can be aborted with C-g.

    (with-temp-buffer
      (insert "<!----><x>< /x>")
      (xml-parse-region))

The trigger is a comment followed by at least one opening tag followed
by a stray less-than character. This is not valid XML due to that extra
space in the closing tag, but I'm expecting `xml-parse-region' to signal
an error in the case of invalid input rather than lock up Emacs.

Just for the sake of context, this issue was initially discovered here:

https://github.com/skeeto/elfeed/issues/17