Fix PR 12028: "GDB crashes on a double free during overload resolution "

2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	PR C++/12028
	* valops.c (find_oload_champ_namespace_loop): removed incorrect
	'old_cleanups' reassignment.

2010-09-22  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/pr12028.cc: New.
	* gdb.cp/pr12028.exp: New.
This commit is contained in:
Sami Wagiaalla
2010-09-22 15:48:59 +00:00
parent e4b0fe2fa7
commit ec32282347
5 changed files with 62 additions and 1 deletions

View File

@@ -2713,7 +2713,7 @@ find_oload_champ_namespace_loop (struct type **arg_types, int nargs,
function symbol to start off with.) */
old_cleanups = make_cleanup (xfree, *oload_syms);
old_cleanups = make_cleanup (xfree, *oload_champ_bv);
make_cleanup (xfree, *oload_champ_bv);
new_namespace = alloca (namespace_len + 1);
strncpy (new_namespace, qualified_name, namespace_len);
new_namespace[namespace_len] = '\0';