This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: 1st of N --enable-checking=gc,gcac failures: double ggc_free


Hello,

This one-liner fixes one of the --enable-checking=gc,gcac failures.
The problem is that set_rhs in tree-ssa-propagate.c copies statement
annotation from one statement to another, making the statements share
it. The annotations are freed explicitly with ggc_free, thus it is was
possible to free the same annotation twice. Normally this is not
visible, as the old statement is thrown away very soon, however
--enable-checking=gc,gcac triggers the failure. Fixed by removing the
annotation from the old statement.

Two bootstraps on i686-pc-linux-gnu with --enable-checking=gc,gcac and
without it are underway. OK for mainline assuming clean bootstraps and
no testsuite regressions?

:ADDPATCH tree-ssa:

2007-08-25  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

    * tree-ssa-propagate.c (set_rhs): Remove the copied annotation
from the original statement.

-- 
Laurynas

Index: gcc/tree-ssa-propagate.c
===================================================================
--- gcc/tree-ssa-propagate.c	(revision 127867)
+++ gcc/tree-ssa-propagate.c	(working copy)
@@ -751,6 +751,7 @@
 		SSA_NAME_DEF_STMT (var) = *stmt_p;
 	    }
 	}
+      stmt->base.ann = NULL;
       break;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]