[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Seg Faults with ldapdelete (ITS#53)



All,

I've been stepping through the ldap code.  I haven't quite found the
culprit yet, but here is what I have discovered so far.

In the file ldap/servers/slapd/back-ldbm/idl.c:

Function idl_delete_key:

at line 674: if ( ! ID_BLOCK_INDIRECT( idl ) )

if I print out db I get the following:

(dbx) print *db
struct {
    dbc_refcnt = 1
    dbc_maxids = 1022
    dbc_maxindirect = 4
    dbc_lastref = 917989332
    dbc_blksize = 8192
    dbc_name = 0x1400201c0 = "/data/ldap393/id2children.gdbm"
    dbc_db = 0x140013800
}

The program then proceeds to loop until it reaches the
function idl_store() on line 689 (idl.c):

At this point I can print out db and get:

(dbx) print *db
struct {
    dbc_refcnt = 4
    dbc_maxids = 917989332
    dbc_maxindirect = 8192
    dbc_lastref = 0
    dbc_blksize = 5368840640
    dbc_name = 0x140013800 = "\220^A^B@^A"
    dbc_db = (nil)
}


Somehow the dbc_name and dbc_db become corrupted!  I'm
still not certain as to why.

 -seth