[DVDnav-discuss] A few patches for minor defects

Alexander Roalter alex at roalter.it
Sat Apr 19 21:55:23 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nico Sabbi wrote:
> Il Saturday 19 April 2008 00:03:39 Erik Hovland ha scritto:
>> I put the libdvdnav code in MythTV through a static analysis tool and it
>> found some defects. I ported the patches I submitted there to the fork
>> on mplayerhq. I offer them here to you in hopes you find them useful.
>>
>> E
>>
> 
> almost all of them perfect and applied, with one exception: the dlclose()
> after a successful dlopen() seems to be the wrong thing to do, if my interpretation
> of the man page is correct. I'd like to have a clarification on this behalf.
> There's only one patch left to review; maybe today or tomorrow.
> 
> In the meantime thanks a lot !

Although I'm not a DVDnav programmer (only a very intensive user), I
agree on dlclose: dlclose should only be called if the functions loaded
from it are no more needed. It is not that opening a dynamic library
with dlopen loads the function somewhere in the memory and a handle is
kept to the file (well, this is done, too).
calling dlclose tells the OS that functions from this module will no
longer be used, and also calls the exit functions defined for the
library (_fini), sometimes also the module-specifc atexit functions.

This stuff is my daily bread-and-butter, so I don't think I'm off here a
lot.

- --
Cheers,
Alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFICk4r1J0MF2u394wRAg9EAKCAzb+VXLb+vsGu9ywgW7UgTNRKpACfUzth
6+65utG/t2RWiNBbmewumiQ=
=486J
-----END PGP SIGNATURE-----



More information about the DVDnav-discuss mailing list