Commit 1d77fa53 by Brendan Kehoe Committed by Brendan Kehoe

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
parent 18a7cd24
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) Sun Sep 14 21:01:23 1997 Jeffrey A Law (law@cygnus.com)
* Makefile.in: Various changes to build info files * Makefile.in: Various changes to build info files
......
...@@ -1748,7 +1748,10 @@ find_exception_handler_labels () ...@@ -1748,7 +1748,10 @@ find_exception_handler_labels ()
/* Generate a handy reference to each label. */ /* 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)); bzero ((char *) labels, (max_labelno - min_labelno) * sizeof (rtx));
/* Arrange for labels to be indexed directly by CODE_LABEL_NUMBER. */ /* Arrange for labels to be indexed directly by CODE_LABEL_NUMBER. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment