On 2006-11-30 17:01-0000 Andrew Ross wrote: > > 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.
Thanks very much for finding and fixing this problem. > 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? I think you are right to broaden our coverage. I just locally tried 20, 21, 24, 25, and 26 to get as widespread testing as possible. For 20, you have to have lena.pgm in the current directory. There are some blank pages (I think corresponding to interactive things you can do for interactive devices), but otherwise it produces acceptable results as do the other examples I mentioned (within the limitations of time clock variations depending on computer load and speed for 21, and postscript type 1 font limitations for 24 and 26.) If these additional results produce a segfault due to some PLplot change (as just occurred for example 20), we want to know about it. Anyhow, please just go ahead with broadening our test coverage for all languages. The only examples that must be excluded are 14 (two output files) and 17 (purely interactive). > > 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. I agree we could really use automated valgrind testing of all examples. Furthermore, I think this should be straightforward to implement with our CBS so please go ahead. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- 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