Subject: bug#5281: closed (Re: bug#5281: 23.1; xml-parse-region causes infinite loops if the region is not well-formed XML)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 30 Jun 2010 20:36:02 +0000

Your bug report

#5281: 23.1; xml-parse-region causes infinite loops if the region is not well-formed XML

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
5281: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5281
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#5281: 23.1; xml-parse-region causes infinite loops if the region is not well-formed XML
From: Chong Yidong <[email-masked]>
To: Yuto Hayamizu <[email-masked]>
Cc: [email-masked]
Date: Wed, 30 Jun 2010 16:35:07 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> Following code causes infinite loop:
>
>     (with-temp-buffer
>       (insert "foo</bar>")
>       (xml-parse-region (point-min) (point-max)))

Thanks, I've checked in a fix.

Subject: bug#5281: 23.1; xml-parse-region causes infinite loops if the region is not well-formed XML
From: Yuto Hayamizu <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 29 Dec 2009 14:41:40 +0900 (JST)
List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>

Following code causes infinite loop:

    (with-temp-buffer
      (insert "foo</bar>")
      (xml-parse-region (point-min) (point-max)))

Docstring of xml-parse-region says "Returns the XML list for the
region, or raises an error if the region is not well-formed XML.", so
I think the expected result of this code is nil.

In GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1)
 of 2009-10-01 on salmon
Windowing system distributor `The X.Org Foundation', version 11.0.10600000
configured using `configure  '--program-suffix=23' '--prefix=/usr/local' 'CFLAGS=-g -O3''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=uim
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  global-widen-window-mode: t
  widen-window-mode: t
  global-typing-outputz-mode: t
  typing-outputz-mode: t
  iswitchb-mode: t
  auto-insert-mode: t
  global-auto-complete-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p <help-echo> 
C-l <help-echo> C-n <help-echo> C-n <help-echo> C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n <help-echo> C-n <help-echo> C-n C-n C-n C-n <help-echo> 
C-n <help-echo> C-e <help-echo> C-j <help-echo> SPC 
<help-echo> l <help-echo> C-j <help-echo> l <help-echo> 
( ) <help-echo> C-b <help-echo> U <help-echo> b u <help-echo> 
n <help-echo> t <help-echo> u <help-echo> SPC <help-echo> 
9 <help-echo> . <help-echo> 0 <help-echo> 4 <help-echo> 
C-j <help-echo> n o <help-echo> S A <help-echo> i <help-echo> 
s i <help-echo> n <help-echo> n <help-echo> b a <help-echo> 
n <help-echo> n <help-echo> SPC <help-echo> C-j <help-echo> 
C-b <help-echo> C-b <help-echo> C-b <help-echo> C-b 
<help-echo> C-b <help-echo> C-b C-b C-b C-b C-b C-b 
C-b <help-echo> C-b <help-echo> C-b <help-echo> C-b 
<help-echo> C-b <help-echo> C-b <help-echo> C-k <help-echo> 
C-j <help-echo> t o <help-echo> , <help-echo> l <help-echo> 
g <help-echo> i t <help-echo> C-j <help-echo> d <help-echo> 
e <help-echo> t o <help-echo> r <help-echo> e <help-echo> 
r <help-echo> u <help-echo> S a <help-echo> i <help-echo> 
s i <help-echo> n <help-echo> n <help-echo> b a n n 
<help-echo> SPC <help-echo> C-j <help-echo> n o <help-echo> 
R <help-echo> y o <help-echo> u <help-echo> h o <help-echo> 
u SPC <help-echo> C-j <help-echo> . <help-echo> l <help-echo> 
C-n <help-echo> C-l <help-echo> C-n <help-echo> C-n 
<help-echo> C-l <help-echo> C-n <help-echo> C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
<help-echo> C-p <help-echo> C-p <help-echo> C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p <help-echo> M-x e m a c s SPC b 
u <tab> C-a C-k b u g <tab> C-a C-k r e p o <tab> r 
t SPC e m a <tab> b u <tab> <return>

Recent messages:
cond: Beginning of buffer [9 times]
Matches =518d=73fe=3057=305f=74b0=5883=306f GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1) of 2009-10-01 (... [19-]
Matches =518d=73fe=3057=305f=74b0=5883=306f GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1) of 2009-10-01 (Ubuntu 9.04=306e=6700=65b0=7248) [19]
cond: End of buffer [3 times]
Saving file /home/haya/Dropbox/blog/emacs-xml-parse-region.txt...
Wrote /home/haya/Dropbox/blog/emacs-xml-parse-region.txt
Contacting host: outputz.com:80
(Shell command failed with code 1 and no output)
Reading [text/html; charset=UTF-8]... 14 bytes of 2 bytes (700%)
Making completion list...