This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH to cp/name-lookup.c
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: 03 Oct 2003 13:02:22 +0200
- Subject: C++ PATCH to cp/name-lookup.c
- Organization: Integrable Solutions
This patch makes sure that we don't leave an opportunity to make the
garbage collector into thinking that binding_entrys on the free-list
may active objects.
Bootstrapped and regtested on an i686-pc-linux-gnu.
Applied as obvious.
-- Gaby
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
retrieving revision 1.3714
diff -p -r1.3714 ChangeLog
*** ChangeLog 2 Oct 2003 23:14:00 -0000 1.3714
--- ChangeLog 3 Oct 2003 10:50:06 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * name-lookup.c (binding_entry_free): Nullify name and type
+ fields.
+
2003-10-02 Mark Mitchell <mark@codesourcery.com>
PR c++/12486
Index: name-lookup.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/name-lookup.c,v
retrieving revision 1.12
diff -p -r1.12 name-lookup.c
*** name-lookup.c 30 Sep 2003 11:56:25 -0000 1.12
--- name-lookup.c 3 Oct 2003 10:50:06 -0000
*************** binding_entry_make (tree name, tree type
*** 66,71 ****
--- 66,73 ----
static inline void
binding_entry_free (binding_entry entry)
{
+ entry->name = NULL;
+ entry->type = NULL;
entry->chain = free_binding_entry;
free_binding_entry = entry;
}
*************** binding_table_free (binding_table table)
*** 114,120 ****
{
binding_entry entry = temp;
temp = entry->chain;
- entry->chain = NULL;
binding_entry_free (entry);
}
table->chain[i] = NULL;
--- 116,121 ----