Issue 1081633: LDAP search segfaults on RedHat FC3 (original) (raw)
Doing an LDAP search against one of our intranet LDAP servers results in a segmentation fault with Python 2.3.4 on Fedora Core 3. Here is a 2-line test case:
server = ldap.initialize(URL) results = server.search_st(BASE, ldap.SCOPE_ONELEVEL, '(cn=anyone@gmail.com)', ['cn', 'email'])
The gdb backtrace is attached.
If I run the same code on a different system (Debian, Python 2.3.4, OpenLDAP 2.1.30), instead of a segfault I see an LDAP error:
ldap.NO_RESULTS_RETURNED: {'info': '', 'desc': 'No results returned'}
Based on the backtrace, I think the FC3 system is not handling that error correctly.
Python version information:
Python 2.3.4 (#1, Oct 26 2004, 16:42:40) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
Python and LDAP RPMs installed:
python-2.3.4-11 nss_ldap-220-3 python-ldap-2.0.1-2 openldap-2.2.13-2 openldap-devel-2.2.13-2 openldap-clients-2.2.13-2 openldap-servers-2.2.13-2
uname -a: Linux xxx.yyy.net 2.6.9-1.681_FC3.WKD_tr_mts_1 #1 Tue Nov 23 22:35:54 EST 2004 i686 athlon i386 GNU/Linux