This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/34118] Please enable stack checking (-fstack-check) by default
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Nov 2007 15:37:15 -0000
- Subject: [Bug ada/34118] Please enable stack checking (-fstack-check) by default
- References: <bug-34118-286@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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