[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: libldap_r thread-safety problems

Emmanuel Dreyfus wrote:
Howard Chu <hyc@symas.com> wrote:
As I said in my previous message - when we're forced to use a non-reentrant function, we protect it with a mutex. But that mutex only
protects calls from our code. If there are other threads in other software calling the same libc functions, they will not be guarded by
our mutexes, and so their behavior is indeterminate. This is one reason
why we cannot guarantee support for libldap_r in arbitrary code.

Well, it seems to me that you could garantee that, if libldap_r only used thread-safe functions. A configure flag to request libldap_r build to use only thread-safe function or fail would be very helpful.

Feel free to submit a patch.

Note that such a flag doesn't enhance libldap_r's usefulness to slapd in any way, so there's very little motivation for anyone else to create this patch for you. If you want it, write it.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
Chief Architect, OpenLDAP http://www.openldap.org/project/