diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-16 23:42:06 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-16 23:42:06 +0000 |
commit | 5fa09f4d9126f19250086a991c616400ef730633 (patch) | |
tree | 021e6b777faca34f0b16334c7b7ec2720de79db4 /gcc/tree-ssanames.c | |
parent | 03abd289eccdbfd28c1c8edc65e3cf7cd56c7325 (diff) | |
download | gcc-5fa09f4d9126f19250086a991c616400ef730633.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120837 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r-- | gcc/tree-ssanames.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index d9ab940fa90..07b83f831af 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -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; |