re PR target/46093 (code compiled with -fsplit-stack crashes when passing large struct)
authorIan Lance Taylor <iant@google.com>
Fri, 7 Oct 2011 22:51:11 +0000 (22:51 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 7 Oct 2011 22:51:11 +0000 (22:51 +0000)
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

libgcc/ChangeLog
libgcc/generic-morestack.c

index a83456b386e13812782d74b10e8e80006a17d880..6bc2ed581efa697410838a0a70e96d30975f7c30 100644 (file)
@@ -1,3 +1,10 @@
+2011-10-07  Ian Lance Taylor  <iant@google.com>
+
+       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  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        PR bootstrap/49804
index 7e29bbcf7481b261dbeedc66f52c4621a22f46ad..0b660cedd5f28b1f0b21289e42dcc59f683700e2 100644 (file)
@@ -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;