Re: [PATCH 05/10] Implement protection of stack variables

2012-11-12 Thread Dodji Seketeli
Jakub Jelinek writes: > On Mon, Nov 12, 2012 at 12:30:37PM +0100, Dodji Seketeli wrote: >> + For this function, the stack protected by asan will be organized as >> + follows, from the top of the stack to the bottom: >> + >> + Slot 1/ [red zone of 32 bytes called 'RIGHT RedZone'] >> + >> + Slot 2/

Re: [PATCH 05/10] Implement protection of stack variables

2012-11-12 Thread Jakub Jelinek
On Mon, Nov 12, 2012 at 12:30:37PM +0100, Dodji Seketeli wrote: > + For this function, the stack protected by asan will be organized as > + follows, from the top of the stack to the bottom: > + > + Slot 1/ [red zone of 32 bytes called 'RIGHT RedZone'] > + > + Slot 2/ [24 bytes for variable 'a'] > +

Re: [PATCH 05/10] Implement protection of stack variables

2012-11-12 Thread Dodji Seketeli
Diego Novillo writes: > I believe they layout the stack from right to left (top is to the > right). Feels like reading a middle earth map. Kostya, is my > recollection correct? Yes, Konstantin replied to this already but I forgot to update the patch cover letter (that I keep in the commit log

Re: [PATCH 05/10] Implement protection of stack variables

2012-11-06 Thread Diego Novillo
On 2012-11-02 16:00 , Dodji Seketeli wrote: This patch implements the protection of stack variables. To understand how this works, lets look at this example on x86_64 where the stack grows downward: int foo () { char a[23] = {0}; int b[2] = {0}; a[5] = 1; b[1] = 2; r