Issue 3344 - GNU Pth initialized too late causing segfault
Summary: GNU Pth initialized too late causing segfault
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-24 21:09 UTC by thl@dev.de.cw.com
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thl@dev.de.cw.com 2004-09-24 21:09:01 UTC
Full_Name: Thomas Lotterer
Version: 2.2.17
OS: FreeBSD, Linux, Solaris
URL: http://cvs.openpkg.org/chngview?cn=19165
Submission from: (NULL) (62.245.163.160)


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
ldap_pvt_thread_initialize.

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).

Comment 1 Kurt Zeilenga 2004-09-24 23:58:06 UTC
moved from Incoming to Build
Comment 2 Kurt Zeilenga 2004-09-25 03:32:19 UTC
changed notes
changed state Open to Test
Comment 3 Kurt Zeilenga 2004-12-01 19:32:27 UTC
changed state Test to Closed
Comment 4 Howard Chu 2009-02-17 07:02:46 UTC
moved from Build to Archive.Build
Comment 5 OpenLDAP project 2014-08-01 21:05:10 UTC
fixed in HEAD