Re: [xml] memory leak in xmlTextWriter?



On Tue, Jan 20, 2004 at 01:29:41PM +0100, Manuel González Castro wrote:
Hi,

Last week I reported a possible bug in xmlTextWriter (bug #131368), 
[..]
I ran the testcase code inside a loop and the memory increases about 12K per iteration, so it seems it's a 
memory leak.

  Right

Am I misusing xmlTextWriter?

  I don't think it's wrong...

If the answer is no, I think that the memory leaked is allocated in function xmlAllocParserInputBuffer 
(xmlIO.c) line 1960, this is the call stack (line numbers refer to cvs-snapshot 2004-01-20):

xmlAllocParserInputBuffer(int 0) [xmlIO.c, line 1960]

xmlCreatePushParserCtxt(_xmlSAXHandler * 0x0012fe9c, void * 0x00000000, const char * 0x00000000, int 0, 
const char * 0x00000000) [parser.c, line 9750]

xmlNewTextWriterDoc(_xmlDoc * * 0x0012ff78, int 0) [xmlwriter.c, line 277]

main() [line 11]

Of course the leak is not in xmlIO.c or parser.c, but my understanding of xmlTextWriter isn't enough to be 
able to provide a patch for xmlwriter.c.

  Looking at the dump, it seems other stuff is leaked too ...

Could anybody give me a hint, please?

  Not really, I didn't wrote that code, and didn't had time yet to look
at your report, maybe one of the authors can have a look,

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]