From: Alan W. I. <ir...@be...> - 2003-02-12 07:32:32
|
On Mon, 10 Feb 2003, Alan W. Irwin wrote: > On Mon, 10 Feb 2003, Rafael Laboissiere wrote: > > > I can replicate this bug here. The tkwin driver has probably some memory > > management problems that make surface when lt_dlopenext/lt_dlclose are used. > > That's weird, eh? > > I don't completely trust such interpretation.... I ran the valgrind test I suggested with lt_dclose uncommented and excluding certain drivers. This test was based on the 10 February software. The point of this test is to look for memory management problems in the current set of drivers with this old code rather than to look at the code Rafael just checked in which (I believe) avoids making this test of lt_dlopenext/lt_dlclose for every driver. I found I got an absolutely clean valgrind result (except for well known unfreed memory warnings at programme end) if I excluded xwin, tkwin, tk, and gd. Here was the list of drivers for the clean result: ls ../../driversd/*.so ../../driversd/cgm.so* ../../driversd/ljiip.so* ../../driversd/pstex.so* ../../driversd/dg300.so* ../../driversd/null.so* ../../driversd/tek.so* ../../driversd/hpgl.so* ../../driversd/pbm.so* ../../driversd/xfig.so* ../../driversd/impress.so* ../../driversd/plmeta.so* ../../driversd/ljii.so* ../../driversd/ps.so* ldd shows that each of these is dynamically linked just to libplotd, libm, libc, and libdl. (cgm is also linked to the cd library, but that is a static library so its a different case than gd, xwin, tkwin, and tk which all are linked to extra dynamic libraries.) If I added in gd, then I got valgrind errors, but no segfault. In a previous test with gd, xwin, and tkwin (and tk?) we got segfaults. There does seem to be a pattern developing that all drivers linked to extra dynamic libraries have memory management problems of some kind that are reported by valgrind. I cannot draw a definitive conclusion from this, but there is certainly the possibility that a libtool (libltdl) bug could be the cause of this pattern, and I will certainly check gd, xwin, tkwin, and tk again once a new version of libtool is released. For now, though, it is best to avoid lt_dlclose (which I think the latest code from Rafael does). In this case (commented out lt_dlclose) we do get valgrind errors, but so far (knock on wood for luck!) no segfaults have showed up. I am completely sold on autotools as a convenient way to set up the configuration of our software. However, I am sure looking forward to the day that autotools stabilizes! Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the Canadian Centre for Climate Modelling and Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting software package (plplot.org). __________________________ Linux-powered Science __________________________ |