This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/14180] [3.4 regression] bootstrap failure with 3.4 branch
- From: "jh at suse dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2004 22:24:51 -0000
- Subject: [Bug bootstrap/14180] [3.4 regression] bootstrap failure with 3.4 branch
- References: <20040217171201.14180.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jh at suse dot cz 2004-02-17 22:24 -------
Subject: Re: [3.4 regression] bootstrap failure with 3.4 branch
Hi,
I actually failed to walk the maze of dependencies completely.
The attached patch fix use-after-free bug. It has been approved for
mainline and it is truly trivial, so I commited it to unbreak the
bootstrap. I apologize for the breakage.
PR bootstrap/14180
* cselib.c (remove_useless_values): Do not access released
memory.
Index: cselib.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cselib.c,v
retrieving revision 1.32.4.3
diff -c -3 -p -r1.32.4.3 cselib.c
*** cselib.c 15 Feb 2004 01:20:56 -0000 1.32.4.3
--- cselib.c 17 Feb 2004 17:36:42 -0000
*************** remove_useless_values (void)
*** 358,365 ****
while (values_became_useless);
/* Second pass: actually remove the values. */
- htab_traverse (hash_table, discard_useless_values, 0);
-
p = &first_containing_mem;
for (v = *p; v != &dummy_val; v = v->next_containing_mem)
if (v->locs)
--- 358,363 ----
*************** remove_useless_values (void)
*** 368,373 ****
--- 366,373 ----
p = &(*p)->next_containing_mem;
}
*p = &dummy_val;
+
+ htab_traverse (hash_table, discard_useless_values, 0);
if (n_useless_values != 0)
abort ();
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.2326.2.206
diff -c -3 -p -r2.2326.2.206 ChangeLog
*** ChangeLog 17 Feb 2004 16:48:29 -0000 2.2326.2.206
--- ChangeLog 17 Feb 2004 17:36:43 -0000
***************
*** 1,3 ****
--- 1,9 ----
+ 2004-02-17 Jan Hubicka <jh@suse.cz>
+
+ PR bootstrap/14180
+ * cselib.c (remove_useless_values): Do not access released
+ memory.
+
2004-02-17 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/14178
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14180