This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Detecting dlclose() on an already closed handle?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]