Re: [xml] exception/segfault on xmlFreeDoc()

On Wed, Mar 10, 2004 at 06:54:02PM +0100, oliverst online de wrote:

When I run test_LoadDocument() I get a exception/segfault in the
xmlFreeDoc() after the successful LoadDocument.

With MSVC++ and libxml2-2.6.5 it crashes in dict.c line 709, because
dict has already been free'd. 

The libxml2 has been linked statically and was compiled with teh
following configuration and defines:

cscript configure.js xml_debug=no debug=no static=yes iconv=no
schemas=no regexps=no docb=no threads=native ftp=no http=no reader=no
walker=no legacy=no xpath=yes xptr=no catalog=no xinclude=no c14n=no


And trying an older version (I don't have the version number handy) in
MinGW also crashes. The crash does happen in valid.c line 2856
(xmlGetDtdAttrDesc() -> if (dtd->attributes == NULL) return(NULL);)
because dtd has already been free'd.

I looked all over it and couldn't see the problem at all. It all looked
fine to me. I unlinked the nodes properly.

  If you start moving subtrees from different document, use the
new xmlReadxxx() function and pass it the XML_PARSE_NODICT option.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]