[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
slaptest - segmentation fault (ITS#3268)
Full_Name: Daniel Mueller
Version: 2.2.15
OS: linux
URL: http://crux.fh-regensburg.de/cgi-bin/cvstrac/getfile/clc/openldap/Pkgfile
Submission from: (NULL) (3ffe:b80:1678:1:240:5ff:fe01:220f)
Hello,
Since I'm an openldap newbie I wanted to use the 'slaptest' tool to check my
slapd.conf file. With the current version 2.2.15, I've got a segmentation fault
after it told me that my configuration file looks okay.
So I started ddd/gdb and found out the following:
servers/slapd/back-bdb/init.c: line 493:
XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker);
ddd showed me, that 'bdb->bi_dbenv' was ZERO (0x0). The result:
-----------snip------------
(gdb) step
Program received signal SIGSEGV, Segmentation fault.
0x080c2f99 in bdb_db_close (be=0x0) at init.c:493
(gdb)
-----------snap------------
I've made a simple patch:
-----------snip------------
openldap-2.2.15-orig/servers/slapd/back-bdb/init.c
@@ -490,7 +490,8 @@
ldap_pvt_thread_rdwr_wunlock ( &bdb->bi_idl_tree_rwlock );
}
- XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker);
+ if (bdb->bi_dbenv != NULL)
+ XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker);
return 0;
}
-----------snap------------
It works nice now. But - to be honest - I'm not a programmer. What else do I
break with this line ?
The URL field points to a page that shows how we configure/compile openldap (a
CRUX Linux port).
Best regards,
Daniel
--
Daniel Mueller
Berlin, Germany (OpenPGP: 1024D/126EC290)