* Patch committed: Fix -fsplit-stack with very large parameters
@ 2011-10-07 23:58 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2011-10-07 23:58 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
The -fsplit-stack runtime support code has a bug reported in PR 46093:
if the size of the stack parameters is exceptionally large, the
parameters can overrun the entire newly allocated stack segment. This
patch fixes the problem. Bootstrapped and tested on
x86_64-unknown-linux-gnu. Committed to mainline.
Ian
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 425 bytes --]
Index: generic-morestack.c
===================================================================
--- generic-morestack.c (revision 179665)
+++ generic-morestack.c (working copy)
@@ -512,7 +512,7 @@ __generic_morestack (size_t *pframe_size
current = *pp;
if (current == NULL)
- current = allocate_segment (frame_size);
+ current = allocate_segment (frame_size + param_size);
current->old_stack = old_stack;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-07 22:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-07 23:58 Patch committed: Fix -fsplit-stack with very large parameters Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).