[PATCH] Add a "no-split-stack" function attribute.

Joerg Sonnenberger joerg at britannica.bec.de
Wed Oct 16 06:19:37 PDT 2013


On Wed, Oct 16, 2013 at 08:55:33AM -0400, Rafael EspĂ­ndola wrote:
> > So, how much stack is it going to get? Noone answered that question so
> > far. Will it work for the next caller? I strongly believe that this is
> > just asking for hard to trace down stack overflows down the ilne...
> 
> No different from what what we have with C and C++ every day. It is
> very reasonable to have a way to turn the checks off. The question is
> how to do it. The optimization you proposed is fairly orthogonal to
> that.

Normal C/C++ programs are written and operate under the assumption of a
nearly infinite stack. I'd expect anyone using split stacks to use the
functionality for tightening the available space and that's exactly the
circumstances where it matters how much stack space a function is
guaranteed to have access to. Of course, some ABIs like AMD64's
essentially guarantee a lower limit that might be large enough.

Joerg



More information about the llvm-commits mailing list