This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR target/91441 - Turn off -fsanitize=kernel-address if TARGET_ASAN_SHADOW_OFFSET is not implemented.
- From: Kito Cheng <kito dot cheng at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Kito Cheng <kito dot cheng at sifive dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jim Wilson <jimw at sifive dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jakub Jelinek <jakub at redhat dot com>, dodji at redhat dot com
- Date: Mon, 19 Aug 2019 11:22:36 +0800
- Subject: Re: [PATCH] PR target/91441 - Turn off -fsanitize=kernel-address if TARGET_ASAN_SHADOW_OFFSET is not implemented.
- References: <20190816024508.31194-1-kito.cheng@sifive.com> <3f96ea79-ce9e-4a09-b612-59cd11491422@redhat.com>
Hi Jeff:
Thanks, committed as r274631.
On Fri, Aug 16, 2019 at 11:51 PM Jeff Law <law@redhat.com> wrote:
>
> On 8/15/19 8:45 PM, Kito Cheng wrote:
> > - -fsanitize=kernel-address will call targetm.asan_shadow_offset ()
> > at asan_shadow_offset, so it will crash if TARGET_ASAN_SHADOW_OFFSET
> > is not implemented, that's mean -fsanitize=kernel-address is not
> > supported for target without TARGET_ASAN_SHADOW_OFFSET implementation.
> >
> > gcc/ChangeLog:
> >
> > PR target/91441
> > * toplev.c (process_options): Check TARGET_ASAN_SHADOW_OFFSET is
> > implemented for -fsanitize=kernel-address, and merge check logic
> > with -fsanitize=address.
> >
> > testsuite/ChangeLog:
> >
> > PR target/91441
> > * gcc.target/riscv/pr91441.c: New.
> OK
> jeff