[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Crash in back-sql with traces (ITS#2640)
Full_Name: Emmanuel Duru
Version: 2.2.0 alpha
OS: solaris 8
URL:
Submission from: (NULL) (195.68.44.148)
When performing a search with scope=one level with server traces, a crash
occurs.
The problem comes from a printf ("..%s") whereas the variable to print is an
integer.
Here is the satck trace :
(gdb) where
#0 0xff0b32e0 in strlen () from /usr/lib/libc.so.1
#1 0xff103098 in _doprnt () from /usr/lib/libc.so.1
#2 0xff10520c in vsnprintf () from /usr/lib/libc.so.1
#3 0xfadc4 in lutil_debug (debug=-41942120, level=1, fmt=0x248b08 "(one)id:
'%s'\n") at debug.c:313
#4 0xa36e8 in backsql_oc_get_candidates (v_oc=0x0, v_bsi=0xfd801750) at
search.c:972
#5 0xc9d54 in avl_inapply (root=0x33cbc0, fn=0xa2f78
<backsql_oc_get_candidates>, arg=0xfd801750, stopflag=0)
at avl.c:467
#6 0xc9d3c in avl_inapply (root=0x33c950, fn=0xa2f78
<backsql_oc_get_candidates>, arg=0xfd801750, stopflag=0)
at avl.c:463
#7 0xc9ec4 in avl_apply (root=0x33c950, fn=0xa2f78 <backsql_oc_get_candidates>,
arg=0xfd801750, stopflag=0,
type=-41937072) at avl.c:528
#8 0xa3e88 in backsql_search (op=0x341328, rs=0xfd801ad8) at search.c:1165
#9 0x4ff04 in do_search (op=0x341328, rs=0xfd801ad8) at search.c:393
#10 0x4e1bc in connection_operation (ctx=0xfd801b80, arg_v=0x341328) at
connection.c:978
#11 0xd83c8 in ldap_int_thread_pool_wrapper (xpool=0x2ccc48) at tpool.c:463
(gdb) up
#1 0xff103098 in _doprnt () from /usr/lib/libc.so.1
(gdb) up
#2 0xff10520c in vsnprintf () from /usr/lib/libc.so.1
(gdb) up
#3 0xfadc4 in lutil_debug (debug=-41942120, level=1, fmt=0x248b08 "(one)id:
'%s'\n") at debug.c:313
313 vsnprintf( buffer, sizeof(buffer), fmt, vl );
(gdb) up
#4 0xa36e8 in backsql_oc_get_candidates (v_oc=0x0, v_bsi=0xfd801750) at
search.c:972
972 Debug( LDAP_DEBUG_TRACE, "(one)id: '%s'\n", base_id.id,
(gdb) list
967 : "", 0, 0 );
968 bsi->status = res;
969 return BACKSQL_CONTINUE;
970 }
971
972 Debug( LDAP_DEBUG_TRACE, "(one)id: '%s'\n", base_id.id,
973 0, 0 );
974
975 rc = backsql_BindParamID( sth, 2, &base_id.id );
976 backsql_free_entryID( &base_id, 0 );
(gdb) print base_id
$1 = {id = 1, keyval = 1, oc_id = 3, dn = {bv_len = 10, bv_val = 0x486dd0
"o=sql,c=ru"}, next = 0x0}