Subject: RE: correct version of libxml2
Daniel,
After having removed calls to xmlCleanupParser() to fix the crash on UNIX, we
now get this exception on Windows while exiting our application. This leads to
a crash. If we put the call back in to xmlCleanupParser(), the exception and
crash go away.
> libxml2.dll!__xmlParserInputBufferCreateFilename(const char *
> URI=0x148ef090, xmlCharEncoding enc=409135704) Line 2498 + 0x9 bytes C
libxml2.dll!xmlDefaultExternalEntityLoader(const char * URL=0x1862ea58,
const char * ID=0x00000000, _xmlParserCtxt * ctxt=0x148ef090) Line 3885 + 0x7
bytes C
libxml2.dll!xmlLoadExternalEntity(const char * URL=0x1862ea58, const
char * ID=0x00000000, _xmlParserCtxt * ctxt=0x148ef090) Line 3945 + 0x11 bytes
C
libxml2.dll!xmlCreateURLParserCtxt(const char * filename=0x1862ea58,
int options=0) Line 13516 + 0x17 bytes C
libxml2.dll!xmlParseFile(const char * filename=0x0a070418) Line 13667
+ 0x11 bytes C
Are there situations where we do want to call xmlCleanupParser() on Windows,
but not Linux/UNIX? It appears the code does different things on Windows than
Linux/UNIX.
Thanks,
-Tom
Thomas Floodeen, Jr.
Mentor Graphics BSD
720.494.1133
-----Original Message-----
From: Daniel Veillard [mailto:[email protected]]
Sent: Monday, April 25, 2011 6:01 PM
To: Floodeenjr, Thomas
Cc: [email protected]
Subject: Re: correct version of libxml2
On Mon, Apr 25, 2011 at 03:02:45PM +0000, Floodeenjr, Thomas wrote:
> Daniel,
>
> Yes indeed, we seem to be calling xmlCleanupParser() in many places.
> We will get with our engineering teams to investigate removing this
> call from our code. I would imagine that they thought at the time that
> this call was needed, as it appears to have had no ill side effects in
> the 2.6.x versions of libxml2.
Oh, that call always deallocated all global variables used by libxml2 except
that some things which were forgotten in the past are now more throroughtly
cleaned up. Things like entity definitions for predefined entities of XML have
always been cleaned up that way for example,
Calling it while the library or its data were still in use has always been a
dangerous thing to do, then it's a matter of luck...
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
[email protected] | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml