From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jose Marino Newsgroups: gmane.emacs.bugs Subject: bug#7172: emacs 23.2; xml.el: xml-parse-file hangs when DOCTYPE element names contain _ (underscore) Date: Thu, 07 Oct 2010 11:07:52 -0600 Message-ID: <4CADFE68.7040407@astro.ufl.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1286471538 4787 80.91.229.12 (7 Oct 2010 17:12:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2010 17:12:18 +0000 (UTC) To: 7172@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 07 19:12:01 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P3u0e-000713-WC for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Oct 2010 19:12:01 +0200 Original-Received: from localhost ([127.0.0.1]:49559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3u0d-0001fa-Pi for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Oct 2010 13:11:59 -0400 Original-Received: from [140.186.70.92] (port=38760 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3u0W-0001ey-DP for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 13:11:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3u0V-0007u2-5d for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 13:11:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3u0V-0007tw-2q for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 13:11:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P3ttu-00013k-Fk; Thu, 07 Oct 2010 13:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jose Marino Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2010 17:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12864710764062 (code B ref -1); Thu, 07 Oct 2010 17:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2010 17:04:36 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P3ttU-00013T-Eq for submit@debbugs.gnu.org; Thu, 07 Oct 2010 13:04:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P3ttS-00013O-Jn for submit@debbugs.gnu.org; Thu, 07 Oct 2010 13:04:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3twZ-0007NH-HH for submit@debbugs.gnu.org; Thu, 07 Oct 2010 13:07:48 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:58610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3twZ-0007ND-FD for submit@debbugs.gnu.org; Thu, 07 Oct 2010 13:07:47 -0400 Original-Received: from [140.186.70.92] (port=33684 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3twY-0000wX-HY for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 13:07:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3twW-0007Ms-Up for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 13:07:46 -0400 Original-Received: from milton.astro.ufl.edu ([128.227.184.224]:60286 helo=mailhost.astro.ufl.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3twW-0007Mn-S2 for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 13:07:44 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mailhost.astro.ufl.edu (Postfix) with ESMTP id 6DEA2A048D for ; Thu, 7 Oct 2010 13:07:43 -0400 (EDT) X-Virus-Scanned: UF Astronomy Mail System (ks/11/19/2009) Original-Received: from mailhost.astro.ufl.edu ([127.0.0.1]) by localhost (mailhost.astro.ufl.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vAV8OV6CpOhs for ; Thu, 7 Oct 2010 13:07:42 -0400 (EDT) Original-Received: from [146.5.3.13] (dhcp3-13.nso.edu [146.5.3.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: marinoj) by mailhost.astro.ufl.edu (Postfix) with ESMTPSA id 20D94A0485 for ; Thu, 7 Oct 2010 13:07:41 -0400 (EDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100928 Lanikai/3.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 07 Oct 2010 13:05:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40753 Archived-At: In a DOCTYPE construction, whenever there's an ELEMENT name with an underscore in its name, function xml-parse-file makes emacs become unresponsive and use 100% cpu. Emacs recovers nicely with C-g but no error is printed. To reproduce this behavior I set up these two simple xml files: ------------ output -------------- $ cat example-good.xml ]> $ cat example-bad.xml ]> ------------ output -------------- Then from emacs I run: (xml-parse-file "example-good.xml") Which as expected produces: ((EXAMPLE nil " ")) But when I do the same for the other file: (xml-parse-file "example-bad.xml") No output is produced and emacs becomes unresponsive. Attaching strace to the running emacs process prints: brk(0x267b000) = 0x267b000 brk(0x269d000) = 0x269d000 brk(0x2637000) = 0x2637000 brk(0x2659000) = 0x2659000 brk(0x267b000) = 0x267b000 brk(0x269d000) = 0x269d000 brk(0x2637000) = 0x2637000 brk(0x2659000) = 0x2659000 brk(0x267b000) = 0x267b000 brk(0x269d000) = 0x269d000 brk(0x2637000) = 0x2637000 brk(0x2659000) = 0x2659000 These messages repeat over and over. I should mention that this behavior seems to be triggered by the underscore in the DOCTYPE ELEMENT name, and is not affected by the underscore in the actual element's name. Thus, this file also triggers the bug: $ cat example-bad2.xml ]>