(com_err_terminate): Set it.
(remove_error_table): Check it, warn and abort if set.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16379
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-05-31 Ken Raeburn <raeburn@mit.edu>
+
+ * error_message.c (terminated): New variable.
+ (com_err_terminate): Set it.
+ (remove_error_table): Check it, warn and abort if set.
+
2004-05-05 Ken Raeburn <raeburn@mit.edu>
* error_message.c (buffer): Static variable deleted.
return 0;
}
+static int terminated = 0; /* for debugging shlib fini sequence errors */
void com_err_terminate(void)
{
struct dynamic_et_list *e, *enext;
enext = e->next;
free(e);
}
+ terminated = 1;
}
#ifndef DEBUG_TABLE_LIST
if (CALL_INIT_FUNCTION(com_err_initialize))
return 0;
+#if !defined(ENABLE_THREADS) && defined(DEBUG_THREADS)
+ if (et_list_lock.initialized == 0 && terminated != 0) {
+ fprintf(stderr, "\n\n *** Function remove_error_table called after com_err library termination. ***\n *** Shared library termination code executed in incorrect order? ***\n\n");
+ abort();
+ }
+#endif
merr = k5_mutex_lock(&et_list_lock);
if (merr)
return merr;