Re: [xml] Strange memory leak in libxml2-2.4.8 (may be in libxslt-1.0.6)



On Thu, Nov 08, 2001 at 11:04:23PM +0300, Lev Serebryakov wrote:
  But in very complex program such memory leak occurs on EVERY pair of
  xmlParseFile()/xmlFreeDoc() calls!

  There is no known memory leak bug in libxml2/libxslt.

  In my big program I parse some documents, make transofrmation, then
  free some of them, then set options of xmllib2 via
  xmlSetGenericErrorFunc() and  xmlSubstituteEntitiesDefault() then
  parse new documents, etc. And every xmlParseFile()/xmlFreeDoc() pair
  is not balanced in such situation! And I have memory leak about 7000
  bytes on every parsed document! It was caught by my wrappers around
   malloc()/free()/strdup()/realloc().

  Drop your wrappers, use mine. Recompile both libxml and libxslt
with memory debug, you will log every single allocation made by them.
This will allow you to also distinguish allocations done by the libraries
from yours, and hence see who leacks memory precisely.
  Read and follow the instructions:
    http://xmlsoft.org/xmlmem.html#Debugging

  Other than that I can't help you, but if you can expose a
bug with xsltproc, I will fix it.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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