[krbdev.mit.edu #5456] valgrind + gsstest finds possible leaks

Ken Raeburn via RT rt-comment at krbdev.mit.edu
Fri Mar 2 00:46:41 EST 2007


The parent gsstest process shows memory leaks under valgrind with the  
current trunk code (and patched 1.6 branch).  I think some of these  
problems are just gsstest not freeing up some objects it acquires,  
but some look more suspicious, especially some of the (several!)  
traces going through krb5_get_cred_from_kdc_opt, like this one:

==30613== 304 (112 direct, 192 indirect) bytes in 4 blocks are  
definitely lost in loss record 20 of 26
==30613==    at 0x401B405: malloc (vg_replace_malloc.c:149)
==30613==    by 0x42E82C2: krb5_fcc_read_principal (cc_file.c:471)
==30613==    by 0x42E93D4: krb5_fcc_next_cred (cc_file.c:1872)
==30613==    by 0x42F21C4: krb5_cc_next_cred (ccfns.c:97)
==30613==    by 0x42E33C7: krb5_cc_retrieve_cred_seq (cc_retr.c:252)
==30613==    by 0x42E35A8: krb5_cc_retrieve_cred_default (cc_retr.c:281)
==30613==    by 0x42E3A4A: krb5_fcc_retrieve (cc_file.c:2116)
==30613==    by 0x42F2177: krb5_cc_retrieve_cred (ccfns.c:76)
==30613==    by 0x430208B: krb5_get_cred_from_kdc_opt (gc_frm_kdc.c:848)
==30613==    by 0x43030C9: krb5_get_credentials (get_creds.c:144)
==30613==    by 0x42A3DBD: krb5_gss_init_sec_context  
(init_sec_context.c:117)
==30613==    by 0x42A81DA: k5glue_init_sec_context (krb5_gss_glue.c:675)
==30613==    by 0x4296557: gss_init_sec_context (g_init_sec_context.c: 
211)
==30613==    by 0x8049DF5: init_sec_context (contexts.c:348)
==30613==    by 0x804BDDD: establish_context (contexts.c:1238)
==30613==    by 0x804C860: sap_establish_context (contexts.c:1548)
==30613==    by 0x8051760: errors_with_contexts (errors.c:877)
==30613==    by 0x8050332: error_tests (errors.c:84)
==30613==    by 0x80574C8: parent_main (gsstest.c:728)
==30613==    by 0x8056DF2: main (gsstest.c:510)

I'm using the option to enable testing of error cases, which among  
other things tries to do an init_sec_context with bogus names.

I've got to get to other work right now, but wanted to put this on  
the record.

Ken




More information about the krb5-bugs mailing list