aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@cygnus.com>1997-09-15 19:07:05 +0000
committerBrendan Kehoe <brendan@gcc.gnu.org>1997-09-15 15:07:05 -0400
commit1d77fa53978457059fc591f35d70f25977651d2a (patch)
treef005856d2982fe850561e628b9793fdb8e0161da
parent18a7cd243d74586c14597c1ccdb2124275a338d4 (diff)
downloadgcc-1d77fa53978457059fc591f35d70f25977651d2a.zip
gcc-1d77fa53978457059fc591f35d70f25977651d2a.tar.gz
gcc-1d77fa53978457059fc591f35d70f25977651d2a.tar.bz2
except.c (find_exception_handler_labels): Use xmalloc instead of alloca...
* except.c (find_exception_handler_labels): Use xmalloc instead of alloca, since MAX_LABELNO - MIN_LABELNO can be more than 1 million in some cases. From-SVN: r15452
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/except.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2566800..7d5badd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+1997-09-15 Brendan Kehoe <brendan@cygnus.com>
+
+ * except.c (find_exception_handler_labels): Use xmalloc instead of
+ alloca, since MAX_LABELNO - MIN_LABELNO can be more than 1 million
+ in some cases.
+
Sun Sep 14 21:01:23 1997 Jeffrey A Law (law@cygnus.com)
* Makefile.in: Various changes to build info files
diff --git a/gcc/except.c b/gcc/except.c
index 32b16b2..1e77fd8 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1748,7 +1748,10 @@ find_exception_handler_labels ()
/* Generate a handy reference to each label. */
- labels = (rtx *) alloca ((max_labelno - min_labelno) * sizeof (rtx));
+ /* We call xmalloc here instead of alloca; we did the latter in the past,
+ but found that it can sometimes end up being asked to allocate space
+ for more than 1 million labels. */
+ labels = (rtx *) xmalloc ((max_labelno - min_labelno) * sizeof (rtx));
bzero ((char *) labels, (max_labelno - min_labelno) * sizeof (rtx));
/* Arrange for labels to be indexed directly by CODE_LABEL_NUMBER. */