This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -fsanitize=address -fstack-protector* (PR sanitizer/88333)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Dec 2018 20:19:52 -0700
- Subject: Re: [PATCH] Fix -fsanitize=address -fstack-protector* (PR sanitizer/88333)
- References: <20181204233223.GE12380@tucnak>
On 12/4/18 4:32 PM, Jakub Jelinek wrote:
> Hi!
>
> The current asan.c code requires that the whole block of vars starts and
> ends on ASAN_RED_ZONE_SIZE (i.e. 32 byte) boundary, so that it is on 4 byte
> boundary in the shadow memory. Normally it is, when frame_offset starts at
> 0, but with -fstack-protector there is the guard above it and in that case
> following patch is needed to realign the end of the block.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2018-12-04 Jakub Jelinek <jakub@redhat.com>
>
> PR sanitizer/88333
> * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
> aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
>
> * c-c++-common/asan/pr88333.c: New test.
OK
jeff