[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ltdl bugs
From: |
Peter O'Gorman |
Subject: |
Re: ltdl bugs |
Date: |
Sat, 02 Apr 2005 21:35:37 +0900 |
User-agent: |
Mozilla Thunderbird 1.0 (Macintosh/20041206) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeff Squyres wrote:
| I think that I have found 2 bugs in libltdl (1.5.14). These are
| repeatable on Linux 2.4 machines:
|
| 1. If you lt_dlopen(NULL) and then lt_dlclose() the handle that was
| returned, a memory leak ensues. This is easily reproducible by writing
| a short program:
|
| -----
| #include <ltdl.h>
|
| int main(int argc, char* argv[]) {
| lt_dlhandle handle;
|
| lt_dlinit();
| handle = lt_dlopen(NULL);
| lt_dlclose(handle);
| lt_dlexit();
| return 0;
| }
| I haven't fully audited what is happening, but I think that this might
| be the correct solution...?
I am not sure that this is a bug, if you check the return code from
lt_dlclose(), you will notice that it fails.
| -----
| lttest.c:12: warning: ISO C forbids assignment between function pointer
| and `void *'
| -----
|
| Can a second function be added, perhaps lt_dlsymfunc(), that returns
| function pointers instead of (void*)?
I think that something similar to freebsd's dlfunc() call would be a good
idea too, it is even in the TODO :)
Peter
- --
Peter O'Gorman - http://www.pogma.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
iQCVAwUBQk6RmLiDAg3OZTLPAQIgKAQAt4SausiWx9E33dQfkb7jMySnQrELs6Sy
KAhRbOh0Ay4J+8JasDdW8aur1FNW3aqCKaEV0K7MG5OzrxldQZx+QJFR9+xNTrlB
T4Ie2ycJMU6LS3jDswkQXNvh6zFKMXulGeDGfecyXHHr9hqqAzNqmE4uF9VERZKU
lQSFzLi98es=
=VotB
-----END PGP SIGNATURE-----
- ltdl bugs, Jeff Squyres, 2005/04/01
- Re: ltdl bugs,
Peter O'Gorman <=
- Re: ltdl bugs, Peter O'Gorman, 2005/04/02
- Re: ltdl bugs, Jeff Squyres, 2005/04/02
- Re: ltdl bugs, Ralf Wildenhues, 2005/04/03
- Re: ltdl bugs, Ralf Wildenhues, 2005/04/03
- Re: ltdl bugs, Jeff Squyres, 2005/04/03
- Re: ltdl bugs, Jeff Squyres, 2005/04/03
- Re: ltdl bugs, Ralf Wildenhues, 2005/04/03
- Re: ltdl bugs, Ralf Wildenhues, 2005/04/03
- Re: ltdl bugs, Jeff Squyres, 2005/04/03
- Re: ltdl bugs, Ralf Wildenhues, 2005/04/03