Re: [xml] memory leak while parsing from memory buffer



"Kevin P. Fleming" <kpfleming backtobasicsmgmt com> writes:

Daniel Veillard wrote:

  In my experience nothing replace running regression tests with memory
debug enabled before any commit to the code base. I don't know if you can
do that with perl, but it saved tremendous amount of time for libxml2 and
libxslt because the leak show up at the moment you try to commit the guilty
code to the CVS base, not weeks or months later.

And if you've never used valgrind to do this testing, do so ASAP :-) 
It's amazingly useful as long as you can test on an x86 system, it
found problems for me that would have been nearly impossible to find
any other way (like referencing off the end of an allocated block of
memory).

Yes, I know valgrind and I indeed found it very useful many times, but
mostly for finding the cause of a segmentation fault (usually in
somebody else's code ;-)), but didn't learn to use it for memory leak
regressions on a similar bases. Will try to do better next time :-)

Cheers,

-- Petr

Attachment: pgpYHdcAY0_vK.pgp
Description: PGP signature



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