[Ltrace-devel] r65 - ltrace/trunk

Ian Wienand ianw-guest at costa.debian.org
Mon Aug 14 03:42:30 UTC 2006


Author: ianw-guest
Date: 2006-08-14 03:42:30 +0000 (Mon, 14 Aug 2006)
New Revision: 65

Modified:
   ltrace/trunk/ChangeLog
   ltrace/trunk/demangle.c
Log:
remove an un-needed dictionary free


Modified: ltrace/trunk/ChangeLog
===================================================================
--- ltrace/trunk/ChangeLog	2006-08-07 04:10:08 UTC (rev 64)
+++ ltrace/trunk/ChangeLog	2006-08-14 03:42:30 UTC (rev 65)
@@ -1,3 +1,9 @@
+2006-08-14  Steve Fink <sphink at gmail.com>
+
+	* demangle.c: remove my_demagle_dict_clear(), remove atexit() call
+	for same.  Avoid potential segfault as demangling uses the
+	dictionary.
+
 2006-08-07  Steve Fink <sphink at gmail.com>
 
 	* display_args.c, etc/ltrace.conf, ltrace.h, read_config_file.c,

Modified: ltrace/trunk/demangle.c
===================================================================
--- ltrace/trunk/demangle.c	2006-08-07 04:10:08 UTC (rev 64)
+++ ltrace/trunk/demangle.c	2006-08-14 03:42:30 UTC (rev 65)
@@ -18,12 +18,6 @@
 
 static struct dict *d = NULL;
 
-static void my_demangle_dict_clear(void)
-{
-	/* FIXME TODO XXX: I should also free all (key,value) pairs */
-	dict_clear(d);
-}
-
 const char *my_demangle(const char *function_name)
 {
 	const char *tmp, *fn_copy;
@@ -32,10 +26,8 @@
 	int status = 0;
 #endif
 
-	if (!d) {
+	if (!d)
 		d = dict_init(dict_key2hash_string, dict_key_cmp_string);
-		atexit(my_demangle_dict_clear);
-	}
 
 	tmp = dict_find_entry(d, (void *)function_name);
 	if (!tmp) {




More information about the Ltrace-devel mailing list