This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: Detecting dlclose() on an already closed handle?
- From: Rm Beer <rmbeer2 at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 26 Apr 2017 19:48:41 -0300
- Subject: RE: Detecting dlclose() on an already closed handle?
- Authentication-results: sourceware.org; auth=none
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.