Re: [xml] memory corruption on copying XML!?
- From: "Oliver Stöneberg" <oliverst online de>
- To: xml gnome org
- Subject: Re: [xml] memory corruption on copying XML!?
- Date: Thu, 22 Jul 2004 16:39:13 +0200
OK, I found the reason for the problem. The DLLs, that modify the
XMLs and use the libxml2, use it statically linked. And the problem
was the "text" name of the text nodes. I traced my specific problem
down to tree.c and the function xmlNewText. The "cur->name" is set
there and it is set to the global const char array "xmlStringText".
And because it's set to that global var it does point to the memory
of that global var and when I unload the DLL that memory is gone. So
it has to be set with xmlStrdup() instead, so it does still exists
after the DLL is gone. This also applies to the vars
"xmlStringTextNoenc" and "xmlStringComment".
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]