Re: [xml] xmlReader dict leak in 2.6.6?



On Tue, Oct 19, 2004 at 04:52:28AM -0400, Daniel Veillard wrote:
  This rings a bell, but ...  The closest I could find in the
  ChangeLog was a commit Tue Dec 30 16:26:13 HKT 2003 William Brack
  but this was before 2.6.6 . I think I also fixed some reuse leak
  when I made sure XInclude parsing shared the document dictionnaries,
  the fix may have been included as part of this.  The key part is to
  be sure the reuse is tested as part of the regression tests the best
  way might be to isolate and drop a small example like the ones in
  doc/examples, this is both educational and make sure memory debug is
  exercised as part of the regression and release tests.

Ok I've had a go at an example, which is attached.  It should either
demonstrate the problem or my ignorance of the API :) The output could
probably be made more useful for regression testing purposes.

If the example is run linked against 2.6.6 some memory is leaked, if
using 2.6.14 nothing is leaked.  I've attached some Purify output for
the 2.6.6 run.  Interestingly, my original test case used
xmlReaderForMemory and in that case Purify showed the memory as
definitely leaked (MLK), but in this case it shows most of it as PLK
(potentially leaked).

cheers,

Graham.

-- 
Graham Bennett

Attachment: reader4.c
Description: Text Data

Attachment: purify.out
Description: Text document



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