SEGV in krb5_free_cred_contents

Markus Moeller huaraz at moeller.plus.com
Wed Oct 21 19:20:31 EDT 2009


I have an application which creates a cache, stores a ticket and then 
destroys the cache, but sometimes I get a SEGV. This is on OpenSolaris (but 
I think the code is the same as the MIT code).

t at 1 (l at 1) signal SEGV (no mapping at the fault address) in 
krb5_free_cred_contents at line 180 in file "kfree.c"
  180       if (val->client) {
(dbx) where
current thread: t at 1
=>[1] krb5_free_cred_contents(context = ???, val = ???) (optimized), at 
0xd22ddf3b (line ~180) in "kfree.c"
  [2] krb5_free_creds(context = ???, val = ???) (optimized), at 0xd22de11c 
(line ~244) in "kfree.c"
  [3] krb5_mcc_free(context = ???, id = ???) (optimized), at 0xd22b6e74 
(line ~176) in "cc_memory.c"
  [4] krb5_mcc_destroy(context = ???, id = ???) (optimized), at 0xd22b6f4a 
(line ~214) in "cc_memory.c"
  [5] krb5_cc_destroy(context = ???, cache = ???) (optimized), at 0xd22b8671 
(line ~55) in "ccfns.c"
  [6] krb5_cleanup(), line 813 in "test.c"

which is:

  177   void KRB5_CALLCONV
  178   krb5_free_cred_contents(krb5_context context, krb5_creds *val)
  179   {
  180       if (val->client) {
  181           krb5_free_principal(context, val->client);
  182           val->client = 0;
  183       }
  184       if (val->server) {
  185           krb5_free_principal(context, val->server);
  186           val->server = 0;
  187       }
  188

Do I need to check if the cache has credentials before a destroy the cache 
?

Markus 





More information about the Kerberos mailing list