[Bug middle-end/13182] -fstack-check probes too distant when allocating on stack

fw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 30 10:07:00 GMT 2017


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

--- Comment #7 from Florian Weimer <fw at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #6)
> That's as expected: the probing mechanism maintains a protection area so the
> program can recover from a stack overflow condition by raising an exception.
> That's why it always probes a few pages ahead but, once the first few pages
> are skipped at the entry point, every subsequent page is probed.

I'm not sure if the the probing offset is large enough for this purpose because
the kernel keeps pushing more and more data onto the stack during signal
handling:

  https://sourceware.org/bugzilla/show_bug.cgi?id=20305


More information about the Gcc-bugs mailing list