On Thu, May 07, 2009 at 04:29:24PM +0200, Sven Neumann wrote: > Hi, > > On Thu, 2009-05-07 at 15:56 +0200, Denis Oliver Kropp wrote: > > > > I think I already reported this here quite a while ago, but the change > > > was never committed and still sits in my local tree. Please review and > > > tell me if it is OK to push this change to the git repository. > > > > You should at least make sure that multiple interface implementations > > in one shared module or linked statically into the application binary > > are still working. There was a double free issue when one dynamic lib > > (un)registered multiple interfaces. > > I didn't check that and I am not sure how to check that. However > valgrind showed a memory leak and if you look at the code you will see > that impl is freed a few lines below. Shouldn't we also free the > filename field of impl then?
The fix is somewhat academic at this point though since AFAICS there is no way to unload interface implementations so this code should only run on program exit, but at least it would eliminate some noise from valgrind output. I don't immediately see any double free problem with this code but I do see other problems with having multiple interface implemenations in one module. dlopen() will call the constructors for all the impls so all of them will be added to the list but then the code only checks the last one added to the list. So it seems that if the first dynamically loaded interface implemenation that the program wants to use is not the last implementation registered by one module then the program will not find the implemenation. Or did I miss something? -- Ville Syrjälä syrj...@sci.fi http://www.sci.fi/~syrjala/ _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev