tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: obsoleting shlibs - what's the plan



On Sat, Mar 29, 2008 at 12:36:14PM +0900, Joerg Sonnenberger wrote:
 > > It's also not clear that loading two instances of the "same" library
 > > is necessary wrong in all cases. For example, a library that provided
 > > the functions in <string.h> could be cloned fairly safely, whereas two
 > > different mallocs is clearly a losing proposition no matter what you
 > > do.
 > 
 > A different malloc is actually safe as well as long as you implement the
 > whole family.

Not really. If a pointer returned by one malloc's malloc makes its way
to the other malloc's free, nothing good can possibly happen.

Also, with many malloc implementations they'll fight over the process
break and get seriously confused.

 > At least libpthread and libc should check explicitly that
 > they are loaded only once. In the caes of libpthread, it should also
 > check and fail miserable when it is loaded via dlopen.

It's not clear that this can be done without help from the dynamic
linker.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index