OpenLDAP
Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest

Viewing Incoming/5605
Full headers

From: mail_ben_schmidt@yahoo.com.au
Subject: Inappropriate SLAP_SOCK_NOT_ACTIVE assertion failing
Compose comment
Download message
State:
0 replies:
0 followups:

Major security issue: yes  no

Notes:

Notification:


Date: Tue, 8 Jul 2008 15:05:03 GMT
From: mail_ben_schmidt@yahoo.com.au
To: openldap-its@OpenLDAP.org
Subject: Inappropriate SLAP_SOCK_NOT_ACTIVE assertion failing
Full_Name: Ben Schmidt
Version: 2.4.10
OS: MinGW32, Mac OS X
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (124.168.9.190)


I have recently cross-compiled OpenLDAP for MinGW32 on Mac OS X. While debugging
to find and fix two crashes which I will detail in other posts, I discovered
that an assertion is always failing because it seems it is inappropriately
included when it shouldn't be. I suggest this patch.

diff -ru --exclude=Makefile openldap-2.4.10/servers/slapd/daemon.c
openldap/servers/slapd/daemon.c
--- openldap-2.4.10/servers/slapd/daemon.c	2008-05-28 06:12:44.000000000 +1000
+++ openldap/servers/slapd/daemon.c	2008-06-28 21:54:38.000000000 +1000
@@ -829,7 +829,9 @@
 {
 	ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
 
+#if defined(HAVE_EPOLL)
 	assert( SLAP_SOCK_NOT_ACTIVE(s) );
+#endif
 
 	if ( isactive ) slap_daemon.sd_nactives++;
 

If you search for where the relevant parts of the macros involved in
SLAP_SOCK_NOT_ACTIVE, and particularly the marking of active and inactive, I
believe you will find they apply only in the HAVE_EPOLL case, and thus the
assertion should only hold in that case.

I did find a closed issue in your tracker related to the same assertion failing,
but it didn't detail the fix, and was very old, so I assume was not relevant to
this particular problem.



Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest


The OpenLDAP Issue Tracking System uses a hacked version of JitterBug

______________
© Copyright 2009, OpenLDAP Foundation, info@OpenLDAP.org