Detecting dlclose() on an already closed handle?
Rm Beer
rmbeer2@gmail.com
Wed Apr 26 22:48:00 GMT 2017
The problem of double dlclose() not is a bug. I read about of this in
the listing and view that dlclose() seem has already everything the
need for clean from the memory: check the recursive dlclose(), free
memory, etc.
The problem is from the programmer, you known that where you
close/free anything, in the memory have a garbage of the last data
used. This garbage if not clean or replaced by any other new memory,
have misleading datas.
The programmer must check if already have execute a double dlclose().
No POSIX, glibc or other libraries, only the programmer.
Can are confuse where saying all dlopen() have all dlclose(). Not
confused this with double dlclose() for dlopen(). Where you use
dlclose() for a dlopen(), the pair is complete. The (void*) of handler
is now a garbage that must be forgotten.
Not is a bug.
More information about the Libc-alpha
mailing list