Hi  everyone,  require your suggestion ,  facing segmentation 
violation issue, when invoked ldap_init()when
tried analysing by gdb of coredump it points for malloc failure in
ldapxx.so libraries, not sure wheather any issues should be considered
for overcoming this,  would appreciate your solutions about 
issue. LDAP      *ld_user;/* Code - start*/ 
               
ld_user = ldap_init(LDAP_SERVER, LDAP_PORT);  //Connect to Local LDAP 
Server       if(ld_user == NULL)
                     
 {
                           
 fprintf(fpDisplay,\"ERROR : ldap_init: ....Allocated : %p\\n\",ld_user );
                           
 exit(1);
                     
 }
                     
 else
                     
 {
                         
 fprintf(fpDisplay,\"main: ldap_init: Sucess =.Allocated=%p\\n\", ld_user);
                     
 }
                     
 fflush(NULL);
                     
 rc = ldap_simple_bind_s( ld_user, bind_dn, LDAP_PASSWD);
                     
 if ( rc != LDAP_SUCCESS )
                       
 {
                         
 fprintf( fpDisplay, \"main: ldap_simple_bind_s: ldap_simple_bind_s\\n\" );
                         
 return -3;
                       
 }
/* Code Ends */Snap shot of GDB of coredump
0x00861d49 in _int_malloc () from /lib/tls/libc.so.6
(gdb) #1  0x00861d49 in _int_malloc () from /lib/tls/libc.so.6
(gdb) #2  0x008610ed in malloc () from /lib/tls/libc.so.6
(gdb) #3  0x00f3b2ef in ber_memalloc () from /usr/lib/liblber.so.2
(gdb) #4  0x00f3b427 in ber_memrealloc () from /usr/lib/liblber.so.2
(gdb) #5  0x00ac5a6b in ?? () from /usr/lib/libldap.so.2
(gdb) #6  0x00000000 in ?? ()
Thanks in advanceRegards,
 Santosh Kumar.B
 Sr Systems Engineer
 NeoAccel India Pvt Ltd
 Sector 24, Plot no 6, Turbhe
 Navi Mumbai 400705
 Mobile:09820939496

Regards,
 Santosh Kumar.B
 Sr Systems Engineer
 NeoAccel India Pvt Ltd
 Sector 24, Plot no 6, Turbhe
 Navi Mumbai 400705
 Mobile:09820939496

Reply via email to