[Bug ada/34118] Please enable stack checking (-fstack-check) by default

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 20 15:38:00 GMT 2007



------- Comment #5 from ebotcazou at gcc dot gnu dot org  2007-11-20 15:37 -------
> 1) If Targparm.Stack_Check_Probes_On_Target is False (i.e. the "GNAT
> Stack-limit checking" is in effect), what circumstances would cause the
> stack check to not detect an overflow (i.e. "unreliable stack checking")?

If the static frame size of a function is too large (typically > 4KB).

> 2) If Targparm.Stack_Check_Probes_On_Target is True (i.e. the "GCC Probing
> Mechanism" is in effect, using the guard pages), would it take much effort
> to make it "reliable" on all targets, not just Alpha/Tru64, spu-elf and
> maybe some others?

It's not difficult, but you have to do it on a per-architecture basis.

AdaCore has done it on 7 architectures and is ready to contribute this code,
see http://gcc.gnu.org/ml/gcc-patches/2006-11/msg01846.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34118



More information about the Gcc-bugs mailing list