This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: suggestion for projects page: sort frame vars
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 10 Jan 2005 14:32:36 -0800
- Subject: Re: suggestion for projects page: sort frame vars
- References: <200501102030.j0AKUdaQ010239@greed.delorie.com>
On Mon, Jan 10, 2005 at 03:30:39PM -0500, DJ Delorie wrote:
> The theory behind this change is that some ports either have limited
> frame pointer or stack pointer displacements, or can optimize smaller
> displacements. By sorting frame variables by size, gcc can cause more
> of them to be within this limited displacement.
This seems related to one of the techniques ProPolice uses, in that it
places pointers before buffers to keep buffer overruns from overwriting
pointers in the same stack frame (in addition to the protections that
detect overrunning the stack frame itself).
http://www.research.ibm.com/trl/projects/security/ssp/