[Bug middle-end/87220] -fstack-check produces inefficient and wrong tests

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 12 17:59:00 GMT 2018


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

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Eric, even accepting the purpose in 1, what I described in 2 seems like a
> bug. If it needs an extra page past what's actually used, it needs to make
> one probe in the last-used page to ensure it doesn't jump a guard page.

Not if it's caller has done so for it though.

> Anyway, I'll accept that this feature just isn't useful for what I wanted it
> for, but I agree with Alexander that it should be clearly documented that
> not only is it not intended for this purpose, but it fails to perform this
> purpose at all and can even introduce new jump-the-guard-page conditions
> that would not have been present without the option.

We cannot reasonably document that a feature does exactly the opposite of what
it is intended to do, can we?  You need to compile the entire software with the
option, that's all.


More information about the Gcc-bugs mailing list