I've just fixed a bug in plbuf.c to do with memory allocation which 
caused example 20 to crash with a segmentation fault. There was also
an associated memory leak. Looking back at various old versions I have
compiled up here this bug must have been introduced with the changes
to memory buffers in June. 

We have the examples to regression test the library for such problems.
What suprises me is that no-one has reported the bug earlier. 

I often run ctest, but example 20 is not one of those run
automatically since it is an interactive example. Perhaps we need some
way of including this in the standard tests?

Also, just a reminder how useful valgrind is for checking memory
leaks. This showed up an associated problem with buffers not being
free'd. If you are doing anything which involves changes to malloc /
free then I'd recommend running valgrind on a few test programs
afterwards. I'll think whether there is some way of integrating that
into the testing framework too. 

Andrew

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to