aboutsummaryrefslogtreecommitdiff
path: root/libgcc/generic-morestack.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2011-10-07 22:51:11 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-10-07 22:51:11 +0000
commit91a639a157751047ee68101244a549d2ed34fdf5 (patch)
tree3b765e8cf4c5fb417aa4503594814c8f18a4d4f8 /libgcc/generic-morestack.c
parent2205ed2513edc01b29a6a87983ccee7ccaf3b194 (diff)
downloadgcc-91a639a157751047ee68101244a549d2ed34fdf5.zip
gcc-91a639a157751047ee68101244a549d2ed34fdf5.tar.gz
gcc-91a639a157751047ee68101244a549d2ed34fdf5.tar.bz2
re PR target/46093 (code compiled with -fsplit-stack crashes when passing large struct)
PR target/46093 * generic-morestack.c (__generic_morestack): Make sure the segment is large enough for both the stack frame and the copied parameters. From-SVN: r179702
Diffstat (limited to 'libgcc/generic-morestack.c')
-rw-r--r--libgcc/generic-morestack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c
index 7e29bbc..0b660ce 100644
--- a/libgcc/generic-morestack.c
+++ b/libgcc/generic-morestack.c
@@ -512,7 +512,7 @@ __generic_morestack (size_t *pframe_size, void *old_stack, size_t param_size)
current = *pp;
if (current == NULL)
- current = allocate_segment (frame_size);
+ current = allocate_segment (frame_size + param_size);
current->old_stack = old_stack;