[Date Prev][Date Next]
GNU Pth initialized too late causing segfault (ITS#3344)
Full_Name: Thomas Lotterer
OS: FreeBSD, Linux, Solaris
Submission from: (NULL) (126.96.36.199)
When building with GNU Pth support the threading environment is initialized too
late causing sldapd segfaulting on the first ldap_...() function call. The
required GNU Pth call is pth_init() which is indirectly called by
So my solution was to call ldap_pvt_thread_initialize() at an earlier stage. It
does no harm leaving the original late call as a dup because the function
protects itself against multiple calls. See attached URL. I'm unsure whether my
patch can be taken over verbatim as I did not test it under non-Unix and
non-Pth. However, I did some stress testing on FreeBSD 4.10, Debian 3.1 "Sarge"
Linux and Solaris 9 (sparc).