From: Yuto Hayamizu <y.hayamizu@gmail.com>
To: bug-gnu-emacs@gnu.org
Cc: y.hayamizu@gmail.com
Subject: bug#5281: 23.1; xml-parse-region causes infinite loops if the region is not well-formed XML
Date: Tue, 29 Dec 2009 14:41:40 +0900 (JST) [thread overview]
Message-ID: <20091229.144140.405324728872863097.y.hayamizu@gmail.com> (raw)
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...
next reply other threads:[~2009-12-29 5:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-29 5:41 Yuto Hayamizu [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-10-06 18:46 bug#4655: 23.1.50; buffer-swap-text oddity Markus Rost
2010-06-30 20:35 ` bug#5281: 23.1; xml-parse-region causes infinite loops if the region is not well-formed XML Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091229.144140.405324728872863097.y.hayamizu@gmail.com \
--to=y.hayamizu@gmail.com \
--cc=5281@debbugs.gnu.org \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.