GNU bug report logs - #7172
emacs 23.2; xml.el: xml-parse-file hangs when DOCTYPE element names contain _ (underscore)

Previous Next

Package: emacs;

Reported by: Jose Marino <marinoj <at> astro.ufl.edu>

Date: Thu, 7 Oct 2010 17:05:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 7172 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Jose Marino <marinoj <at> astro.ufl.edu>
Cc: 7172 <at> debbugs.gnu.org
Subject: Re: bug#7172: emacs 23.2;
	xml.el: xml-parse-file hangs when DOCTYPE element names contain _
	(underscore)
Date: Thu, 07 Oct 2010 20:39:54 -0400
Jose Marino wrote:

> Attaching strace to the running emacs process prints:
> brk(0x267b000)                          = 0x267b000

A much more useful thing to do in such cases is to
M-x toggle-debug-on-quit
beforehand, then interrupt Emacs with C-g when it hangs. Resulting backtrace:

Debugger entered--Lisp error: (quit)
  looking-at("<!ATTLIST[ 	\n
]*\\([[:alpha:]:_][-[:digit:].[:alpha:]:_]*\\)[ 	\n
]*\\(\\(?:[ 	\n
]*[[:alpha:]:_][-[:digit:].[:alpha:]:_]*[ 	\n
]*\\(?:CDATA\\|\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)\\|\\(?:NOTATION[ 	\n
]([ 	\n
]*[[:alpha:]:_][-[:digit:].[:alpha:]:_]*\\(?:[ 	\n
]*|[ 	\n
]*[[:alpha:]:_][-[:digit:].[:alpha:]:_]*\\)*[ 	\n
]*)\\)\\|\\(?:\\(?:NOTATION[ 	\n
]([ 	\n
]*[[:alpha:]:_][-[:digit:].[:alpha:]:_]*\\(?:[ 	\n
]*|[ 	\n
]*[[:alpha:]:_][-[:digit:].[:alpha:]:_]*\\)*[ 	\n
]*)\\)\\|\\(?:([ 	\n
]*[-[:digit:].[:alpha:]:_]+\\(?:[ 	\n
]*|[ 	\n
]*[-[:digit:].[:alpha:]:_]+\\)*[ 	\n
])\\)\\)\\)[ 	\n
]*\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED[ 	\n
]\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:alpha:]:_][-[:digit:].[:alpha:]:_]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:alpha:]:_][-[:digit:].[:alpha:]:_]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)\\)\\)*[ 	\n
]*>")
  xml-parse-dtd(nil)
  xml-parse-tag(nil nil)
  xml-parse-tag(nil nil)
  xml-parse-region(1 116 #<buffer  *temp*> nil nil)
  xml-parse-file("example-bad.xml")


That certainly is a regexp.




This bug report was last modified 12 years and 326 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.