Re: [xml] [Bug]: Extensive memory usage on invalid documents
- From: Daniel Veillard <veillard redhat com>
- To: Melvyn Sopacua <mdev idg nl>
- Cc: xml gnome org
- Subject: Re: [xml] [Bug]: Extensive memory usage on invalid documents
- Date: Thu, 18 Oct 2001 11:04:07 -0400
On Wed, Oct 17, 2001 at 09:22:39PM +0200, Melvyn Sopacua wrote:
Hi all,
With the help of the Zen community at #AxKit we established quite a sensere
bug,
when validating an XML document. I first encountered this, when using the perl
module, but after testing with xmllint --valid or --postvalid, it became
clear that
the bug is in LibXML itself.
Indeed, it was a critical bug. I have fixed in a relatively generic way
the problem, it may have a couple of side effects but I think the patch
is solid:
orchis:~/XML -> ./xmllint --valid --noout invalid.xml
invalid.xml:38: validity error: Element body content doesn't follow the Dtd
Expecting (block* | p | h6 | hl1 | hl2 | table | ol | ul | dl | bq | fn | note | pre | hr | h6 | a)*, got (p
li strong li strong li li p )
</body>
^
orchis:~/XML ->
If you look closely you will notice that the libxml parser now rewrite
some of the content models for equivalent ones. this allow to keep
the validation code simple and tight (and hence fast).
Patch is in CVS:
http://cvs.gnome.org/bonsai/cvsquery.cgi?module=gnome-xml&branch=HEAD&branchtype=match&dir=gnome-xml&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=10%2F18%2F01+10%3A56&maxdate=10%2F18%2F01+10%3A58&cvsroot=%2Fcvs%2Fgnome
thanks a lot for the report,
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]