On Wed, Sep 07, 2011 at 11:06:59AM -0700, Alan Irwin wrote: > On 2011-09-07 11:02+0100 Andrew Ross wrote: > >> I've gone ahead and commited the change to mark all drivers as resident. >> >> I've tested with octave and this finally cures the long standing crash >> with the cairo driver when you repeatedly call plinit / do some plot / plend. >> The problem in this case was different (reinitialising the library caused a >> crash), but by not unloading the library we get round the problem. >> >> Based on this it seems a sensible thing to do, but please test to make sure >> it doesn't break anything on other systems (particularly Windows) and other >> drivers. > > Hi Andrew: > > Thanks for working on this issue. I think the change you came up with is a > good idea, and I also suspect it will sort out other cairo/plend > issues reported on our list from time to time. > > I do have one question for clarification, however. Is marking all > drivers resident the same as not calling lt_dlexit() at all, or are > there additional things lt_dlexit does that continue despite all > drivers being marked as resident? IOW, does valgrind produce different > results between the two cases of not calling lt_dlexit versus calling > it with all drivers resident? > > That question is just for clarification of what is going on. Even if > valgrind gives the same results in the two cases, I still like your > way of doing it because it adds more flexibility if it turns out one > of our drivers does not like being declared resident.
I'm not sure, but from the libtool documentation: Function: int lt_dlexit (void) Shut down libltdl and close all modules. This function will only then shut down libltdl when it was called as many times as lt_dlinit has been successfully called. Return 0 on success, otherwise the number of errors. I take it from this that lt_dlexit should be paired with lt_dlinit, and may take action to tidy up the libltdl library, irrespective of any modules which are loaded / unloaded. >From this point of view I think it is the right thing to do (TM), even if it makes no difference in terms of a clean valgrind result. As you say, it also makes it easy to re-enable unloading of drivers later if we desire. Andrew ------------------------------------------------------------------------------ Using storage to extend the benefits of virtualization and iSCSI Virtualization increases hardware utilization and delivers a new level of agility. Learn what those decisions are and how to modernize your storage and backup environments for virtualization. http://www.accelacomm.com/jaw/sfnl/114/51434361/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel