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']
> +
> + Slot 3/ [8 bytes of red zone, that adds up to the space of 'a' to make
> +       the next slot be 32 bytes aligned; this one is called Partial
> +       Redzone; this 32 bytes alignment is an asan constraint]

If you are going from top to bottom, the padding (here Slot 3/) goes above
the variables, so you need to swap Slot 2/ and 3/, 5/ and 6/ and adjust
comment for former slot 6/.

> +
> + Slot 4/ [red zone of 32 bytes called 'Middle RedZone']
> +
> + Slot 5/ [8 bytes for variable 'b']
> +
> + Slot 6/ [24 bytes of Partial Red Zone (similar to slot 3]
> +
> + Slot 7/ [32 bytes of Red Zone at the bottom of the stack, called 'LEFT
> +       RedZone']
> +
...
> + The shadow memory for that stack layout is going to look like this:
> +
> +     - content of shadow memory 8 bytes for slot 7: 0xFFFFFFFFF1F1F1F1.

Please strip the extra leading FFFFFFFF from the constants, the stores are
all 32-bit and the constants are just sign-extended.

        Jakub

Reply via email to