https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87220

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Okay, so can you please document that -fstack-check probes one extra page
> ahead by design, skipping one page adjacent to current stack pointer on the
> assumption that callers are also compiled with -fstack-check and therefore
> must have probed that page previously?

Well, that's implicit, if you want to detect stack overflow, you need to
compile the entire software with stack checking, whatever the implementation
method.

> I think an indication that this option is intended for use with Ada also
> would help.

So what isn't clear in the current wording exactly?

     `-fstack-check=' is designed for Ada's needs to detect infinite
     recursion and stack overflows.  `specific' is an excellent choice
     when compiling Ada code.  It is not generally sufficient to
     protect against stack-clash attacks.  To protect against those you
     want `-fstack-clash-protection'.

Reply via email to