From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 13:04:36 2010 Received: (at submit) by debbugs.gnu.org; 7 Oct 2010 17:04:36 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 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 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 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 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 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) 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) 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) Message-ID: <4CADFE68.7040407@astro.ufl.edu> Date: Thu, 07 Oct 2010 11:07:52 -0600 From: Jose Marino User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100928 Lanikai/3.1.4 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: emacs 23.2; xml.el: xml-parse-file hangs when DOCTYPE element names contain _ (underscore) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) 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 ]> From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 20:36:42 2010 Received: (at 7172) by debbugs.gnu.org; 8 Oct 2010 00:36:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P40x0-0004MB-2y for submit@debbugs.gnu.org; Thu, 07 Oct 2010 20:36:42 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P40wx-0004M5-Od for 7172@debbugs.gnu.org; Thu, 07 Oct 2010 20:36:40 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1P4106-0006CV-Rj; Thu, 07 Oct 2010 20:39:54 -0400 To: Jose Marino Subject: Re: bug#7172: emacs 23.2; xml.el: xml-parse-file hangs when DOCTYPE element names contain _ (underscore) References: <4CADFE68.7040407@astro.ufl.edu> From: Glenn Morris X-Spook: TELINT David John Oates Adriatic Operation Iraqi Freedom X-Ran: \-~2:|_(F=+&]l!Id~BTk\*3Rd9_Ia1'`Z9__P~;31jB=]/Bjr+)mU=@p{AoC+3BJ#g@eD X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 07 Oct 2010 20:39:54 -0400 In-Reply-To: <4CADFE68.7040407@astro.ufl.edu> (Jose Marino's message of "Thu\, 07 Oct 2010 11\:07\:52 -0600") Message-ID: <8eaampcyat.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 7172 Cc: 7172@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Jose Marino wrote: > Attaching strace to the running emacs process prints: > brk(0x267b000) =3D 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 backtrac= e: Debugger entered--Lisp error: (quit) looking-at("") xml-parse-dtd(nil) xml-parse-tag(nil nil) xml-parse-tag(nil nil) xml-parse-region(1 116 # nil nil) xml-parse-file("example-bad.xml") That certainly is a regexp. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 01 07:04:13 2012 Received: (at 7172) by debbugs.gnu.org; 1 Jul 2012 11:04:14 +0000 Received: from localhost ([127.0.0.1]:39863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SlHwr-0004Vi-NR for submit@debbugs.gnu.org; Sun, 01 Jul 2012 07:04:13 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:51369) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SlHwo-0004Vb-U8 for 7172@debbugs.gnu.org; Sun, 01 Jul 2012 07:04:11 -0400 Received: from cm162.gamma80.maxonline.com.sg ([202.156.80.162]:43506 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SlHsQ-0006rg-TJ; Sun, 01 Jul 2012 06:59:40 -0400 From: Chong Yidong To: Jose Marino Subject: Re: bug#7172: emacs 23.2; xml.el: xml-parse-file hangs when DOCTYPE element names contain _ (underscore) References: <4CADFE68.7040407@astro.ufl.edu> Date: Sun, 01 Jul 2012 18:59:32 +0800 In-Reply-To: <4CADFE68.7040407@astro.ufl.edu> (Jose Marino's message of "Thu, 07 Oct 2010 11:07:52 -0600") Message-ID: <87vci7u4q3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 7172 Cc: 7172@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Jose Marino writes: > 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. > > $ cat example-bad.xml > > > ]> > > This is fixed in trunk. Thanks for the bug report. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 01 07:04:21 2012 Received: (at control) by debbugs.gnu.org; 1 Jul 2012 11:04:21 +0000 Received: from localhost ([127.0.0.1]:39866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SlHwy-0004W1-UW for submit@debbugs.gnu.org; Sun, 01 Jul 2012 07:04:21 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:51373) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SlHwx-0004Vu-Ed for control@debbugs.gnu.org; Sun, 01 Jul 2012 07:04:19 -0400 Received: from cm162.gamma80.maxonline.com.sg ([202.156.80.162]:43507 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SlHsb-0007W8-1o for control@debbugs.gnu.org; Sun, 01 Jul 2012 06:59:49 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 7172 Date: Sun, 01 Jul 2012 18:59:44 +0800 Message-ID: <878vf3hhlr.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 7172 thanks From unknown Fri Jun 20 19:46:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 29 Jul 2012 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator