From: Ian Lance Taylor Date: Fri, 7 Oct 2011 22:51:11 +0000 (+0000) Subject: re PR target/46093 (code compiled with -fsplit-stack crashes when passing large struct) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91a639a157751047ee68101244a549d2ed34fdf5;p=gcc.git 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 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index a83456b386e..6bc2ed581ef 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,10 @@ +2011-10-07 Ian Lance Taylor + + PR target/46093 + * generic-morestack.c (__generic_morestack): Make sure the segment + is large enough for both the stack frame and the copied + parameters. + 2011-10-06 Rainer Orth PR bootstrap/49804 diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c index 7e29bbcf748..0b660cedd5f 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;