Torsten,

On Fri, May 13, 2005 at 08:59:49AM +0200, Torsten Landschoff wrote:
> I wanted to let you know I've updated my quicktool patch to OpenLDAP.  A 
> developer found a bug in the patch in the HEAD tree, so I've updated mine 
> as well.  It only affects people who would load out-of-order LDIF's (almost 
> no one), but it is a potential issue.

> You can get the latest patch from here:

> <http://www.stanford.edu/services/directory/openldap/configuration/patches/openldap/>

> I also recommend the 64bit and listen-queue patches, which will be in OL 
> 2.2.27.

> Without the 64 bit patch, a 64 bit OL server will overwrite its thread 
> stack.

Hmm.

--- openldap-2.2.26/include/ldap_pvt_thread.h.orig      2005-04-30
23:24:19.370292504 -0700
+++ openldap-2.2.26/include/ldap_pvt_thread.h   2005-04-30
23:31:54.843050120 -0700
@@ -44,9 +44,13 @@
 #define LDAP_PVT_THREAD_CREATE_JOINABLE 0
 #define LDAP_PVT_THREAD_CREATE_DETACHED 1
 
+#define        LDAP_PVT_THREAD_SET_STACK_SIZE
 #ifndef LDAP_PVT_THREAD_STACK_SIZE
-       /* LARGE stack */
-#define LDAP_PVT_THREAD_STACK_SIZE     (4*1024*1024)
+       /* LARGE stack. Will be twice as large on 64 bit machine. */
+#define LDAP_PVT_THREAD_STACK_SIZE     ( 1 * 1024 * 1024 * sizeof(void *) )
+/* May be explicitly defined to zero to disable it */
+#elif LDAP_PVT_THREAD_STACK_SIZE == 0
+#undef LDAP_PVT_THREAD_SET_STACK_SIZE
 #endif
 
 LDAP_F( int )
--- openldap-2.2.26/libraries/libldap_r/thr_posix.c.orig        2005-04-30
23:34:15.908604896 -0700
+++ openldap-2.2.26/libraries/libldap_r/thr_posix.c     2005-04-30
23:44:21.339565400 -0700
@@ -110,7 +110,7 @@
        pthread_attr_create(&attr);
 #endif
 
-#if defined(LDAP_PVT_THREAD_STACK_SIZE) && LDAP_PVT_THREAD_STACK_SIZE > 0
+#ifdef LDAP_PVT_THREAD_SET_STACK_SIZE
        /* this should be tunable */
        pthread_attr_setstacksize( &attr, LDAP_PVT_THREAD_STACK_SIZE );
 #endif

This looks to me like an incorrect workaround for #304549.  The current
version works fine on alpha...

> Also, OL 2.2.23 had a serious bug in it, and I think it would be great if 
> Debian Sarge could get bumped up to 2.2.26 + the above patches before Sarge 
> is officially released.

Uh, which of these bugs was supposed to be the "serious" one?

-- 
Steve Langasek
postmodern programmer

Attachment: signature.asc
Description: Digital signature

Reply via email to