diff options
author | brendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-28 23:39:28 +0000 |
---|---|---|
committer | brendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-28 23:39:28 +0000 |
commit | 46142c2d99b9498f4dd1ea34baba5f094a00f267 (patch) | |
tree | 6e9ce222eb9af1aad3826cc235ca09e70aec95c5 /gcc/global.c | |
parent | 7aaa8f0fc1291f1ba0bcf794ec1fb1c154a18b6f (diff) | |
download | gcc-46142c2d99b9498f4dd1ea34baba5f094a00f267.tar.gz |
* global.c (global_alloc): Use xmalloc instead of alloca for
CONFLICTS, since max_allocno * allocno_row_words alone can be more
than 2.5Mb sometimes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16223 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/global.c b/gcc/global.c index 83b09fe431f..0480ebf3c4d 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -486,8 +486,11 @@ global_alloc (file) allocno_row_words = (max_allocno + INT_BITS - 1) / INT_BITS; - conflicts = (INT_TYPE *) alloca (max_allocno * allocno_row_words - * sizeof (INT_TYPE)); + /* We used to use alloca here, but the size of what it would try to + allocate would occasionally cause it to exceed the stack limit and + cause unpredictable core dumps. Some examples were > 2Mb in size. */ + conflicts = (INT_TYPE *) xmalloc (max_allocno * allocno_row_words + * sizeof (INT_TYPE)); bzero ((char *) conflicts, max_allocno * allocno_row_words * sizeof (INT_TYPE)); @@ -570,6 +573,8 @@ global_alloc (file) } } + free (conflicts); + /* Do the reloads now while the allocno data still exist, so that we can try to assign new hard regs to any pseudo regs that are spilled. */ |