On Wed, Mar 02, 2011 at 09:10:47AM +0100, Alexandre Gouraud wrote: > Hello, > > I am currently trying to run gdome tests under cygwin but get segfaults. > Since I can't find with the debuger where the memory corruption occurs, I > tried to use the memory allocation hooks provided by the library. I have > written my own very simple memory allocator: One big chunk of memory is > allocated at first, and then pieces of this big chunk are provided on > demand. The memory is never freed (and I never run out of memory in this > particular case). I setup this memory allocator with: > > xmlMemSetup(myFree, myMalloc, myRealloc,xmlMemStrdup); > > And put this at the very begining of the test. > > I get the results below. I was expecting the "Malloc at 0x... of ..." which > are produced by my own memory allocation routines. But I was not expecting > this > > "Memory tag error occurs: 0x... > bye > xmlMemFree(...) error" > > Which indicates that not all memory allocation routines have been hooked. I > suspect this is internal to the libxml. could this indicate a memory bug in > the library ? > I have libxml2 version 2.7.7
I compile and run libxml2 with full regression tests using the memory debug, so I doubt it's a libxml2 issue. But if gdome modify the tree with a piece of memory allocated by malloc and then tries to free the tree you will get this problem. 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
