]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree-ssanames.c (release_dead_ssa_names): Instead of ggc_freeing
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Jan 2007 23:42:06 +0000 (23:42 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Jan 2007 23:42:06 +0000 (23:42 +0000)
the names, just unlink the chain so we don't crash on dangling pointers
to dead SSA names.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120837 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssanames.c

index 7d44816fc9e4b98cc57df65fda4eecbdbe8176e3..a8e0c18d83484a2676835d6d34b091e49a9e4eea 100644 (file)
@@ -1,3 +1,9 @@
+2007-01-16  Jan Hubicka  <jh@suse.cz>
+
+       * tree-ssanames.c (release_dead_ssa_names): Instead of ggc_freeing
+       the names, just unlink the chain so we don't crash on dangling pointers
+       to dead SSA names.
+
 2007-01-16  Jan Hubicka  <jh@suse.cz>
 
        * cgraph.h (cgraph_decide_inlining_incrementally): Kill.
index d9ab940fa90a7541fe10d917d72110c485745ea0..07b83f831afca75693d62de958d8045f91219d9b 100644 (file)
@@ -325,7 +325,12 @@ release_dead_ssa_names (void)
   for (t = FREE_SSANAMES (cfun); t; t = next)
     {
       next = TREE_CHAIN (t);
-      ggc_free (t);
+      /* Dangling pointers might make GGC to still see dead SSA names, so it is
+        important to unlink the list and avoid GGC from seeing all subsequent
+        SSA names.  In longer run we want to have all dangling pointers here
+        removed (since they usually go trhough dead statements that consume
+        considerable amounts of memory).  */
+      TREE_CHAIN (t) = NULL_TREE;
       n++;
     }
   FREE_SSANAMES (cfun) = NULL;