summaryrefslogtreecommitdiff
path: root/gcc/alloca.c
diff options
context:
space:
mode:
authorkwzh <kwzh@138bc75d-0d04-0410-961f-82ee72b054a4>1996-01-07 07:00:56 +0000
committerkwzh <kwzh@138bc75d-0d04-0410-961f-82ee72b054a4>1996-01-07 07:00:56 +0000
commitb7c41817d34fcb1a2d445190f315b4c98f6df980 (patch)
tree8e9d41b6cb9d9c77c638044d3e3cb7938d715d21 /gcc/alloca.c
parent04c34701f9256074bf9f767bacb2e9e2cb4329c5 (diff)
downloadgcc-b7c41817d34fcb1a2d445190f315b4c98f6df980.tar.gz
(alloca): If malloc fails, just abort.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10949 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alloca.c')
-rw-r--r--gcc/alloca.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/alloca.c b/gcc/alloca.c
index 7020f32c882..7061cec2d31 100644
--- a/gcc/alloca.c
+++ b/gcc/alloca.c
@@ -209,6 +209,9 @@ alloca (size)
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
+ if (new == 0)
+ abort();
+
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;