[xml/sgml-pkgs] Bug#596013: Bug#596013: libxml2: claims to be out of memory when validating SVG with XSD

Mike Hommey mh at glandium.org
Wed Sep 8 07:30:27 UTC 2010

On Tue, Sep 07, 2010 at 10:29:08PM +0000, brian m. carlson wrote:
> Package: libxml2
> Version: 2.7.7.dfsg-4
> Severity: normal
> I get an out of memory error from xmllint when validating an SVG file
> (attached) with an XSD file[0].  The error occurs whether I use an http
> URL or simply download the file to the local disk.
> My kernel is set to the default settings with regard to memory, so it
> should overcommit memory and never cause malloc to set errno to ENOMEM.
> I also at this moment have over 675 MiB of free (not used for cache or
> buffers) memory and have a total of 3 GiB total physical memory.
>   lakeview no % xmllint --schema /tmp/SVG.xsd logo.svg
>   /tmp/SVG.xsd:12: error: xmlSAX2StartElementNs: out of memory
>   lementFormDefault="unqualified" attributeFormDefault="unqualified" xml:lang="en"
>                                                                                  ^
>   /tmp/SVG.xsd:14: parser error : Extra content at the end of the document
>     <import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
>     ^
>   Schemas parser error : Failed to parse the XML resource '/tmp/SVG.xsd'.
>   WXS schema /tmp/SVG.xsd failed to compile

Works for me with that xsd and a random svg. A likely problem is that
you run out of *stack* memory. Try fiddling with ulimit -s.
Having your logo.svg file would be helpful to track down the problem,



More information about the debian-xml-sgml-pkgs mailing list