This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13182] -fstack-check probes too distant when allocating on stack
- From: "schneck at math dot berkeley dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Nov 2003 13:02:46 -0000
- Subject: [Bug c/13182] -fstack-check probes too distant when allocating on stack
- References: <20031125002135.13182.schneck@math.berkeley.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schneck at math dot berkeley dot edu 2003-11-25 13:02 -------
(In reply to comment #1)
I fear you may have missed my point.
Stack probes are supposed to happen at STACK_CHECK_PROBE_INTERVAL,
i.e. 4096.
One function does one probe, at sp - 12792 (which is > 4096*3).
One function does two probes, one at sp - 4392,
the other at sp - 12792 (a difference of > 4096*2).
Even if the thread has TWO guard pages this could fail
to be safe!
Please forgive me if I misunderstand. I had looked at the
internals manual, and I understand (I think) why it is
correct for the first check to be at sp - 4392.
But I am rather convinced that the interval had better
be 4096 (or less) thereafter.
Robert
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13182