https://bugs.openldap.org/show_bug.cgi?id=9239
Bug ID: 9239 Summary: test007 failed on Solaris 10: slapmodify crashed Product: OpenLDAP Version: 2.5 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: ryan@openldap.org Target Milestone: ---
./configure CPPFLAGS=-I/opt/csw/include LDFLAGS="-L/opt/csw/lib -R/opt/csw/lib" && make && make check
Starting test007-slapmodify for mdb...
running defines.sh Running slapadd to build slapd database... Testing modify, add, and delete using slapmodify... Segmentation Fault - core dumped slapmodify failed (139)!
test007-slapmodify failed for mdb after $(( %s - %s )) seconds
(exit 139)
-bash-3.2$ dbx servers/slapd/slapd tests/core [...] program terminated by signal SEGV (no mapping at the fault address) 0xfead646c: strlen+0x000c: movl (%eax),%edx Current function is lutil_debug 74 len = vsnprintf( buffer+off, sizeof(buffer)-off, fmt, vl ); (dbx) where [1] strlen(0x0), at 0xfead646c [2] _ndoprnt(0x823a44b, 0x8046ebc, 0x8045e60, 0x0), at 0xfeb31bce [3] vsnprintf(0x8045e99, 0xff7, 0x823a430, 0x8046ebc), at 0xfeb34d8f =>[4] lutil_debug(debug = 16645, level = 1, fmt = 0x823a430 "oc_check_required entry (%s), objectClass "%s"\n", ... = <value unavailable>, ...), line 74 in "debug.c" [5] oc_check_required(e = 0x8534ad4, oc = 0x831a890, ocname = 0x852a1b8), line 514 in "schema_check.c" [6] entry_schema_check(op = 0x804718c, e = 0x8534ad4, oldattrs = (nil), manage = 0, add = 1, socp = (nil), text = 0x80475d0, textbuf = 0x804708c "", textlen = 256U), line 430 in "schema_check.c" [7] slap_tool_entry_check(progname = 0x824a964 "slapmodify", op = 0x804718c, e = 0x8534ad4, lineno = 3, text = 0x80475d0, textbuf = 0x804708c "", textlen = 256U), line 1186 in "slapcommon.c" [8] slapmodify(argc = 10, argv = 0x8047838), line 446 in "slapmodify.c" [9] main(argc = 10, argv = 0x8047838), line 670 in "main.c"
(dbx) up Current function is oc_check_required 514 Debug( LDAP_DEBUG_TRACE, (dbx) list 514 Debug( LDAP_DEBUG_TRACE, 515 "oc_check_required entry (%s), objectClass "%s"\n", 516 e->e_dn, ocname->bv_val ); 517 518 519 /* check for empty oc_required */ 520 if(oc->soc_required == NULL) { 521 return NULL; 522 } 523 (dbx) print e->e_dn e->e_dn = (nil) (dbx) print ocname->bv_val ocname->bv_val = 0x852a1a0 "OpenLDAPperson"
On other systems, the debug output is:
5ea0dcca oc_check_required entry ((null)), objectClass "OpenLDAPperson"
It appears this version of vsnprintf cannot handle the %s argument being NULL.