[Bug bootstrap/14180] [3.4 regression] bootstrap failure with 3.4 branch
Jan Hubicka
jh@suse.cz
Tue Feb 17 23:16:00 GMT 2004
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
More information about the Gcc-patches
mailing list