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: Jeff Law <law at redhat dot com>
- To: Kito Cheng <kito dot cheng at sifive dot com>, gcc-patches at gcc dot gnu dot org, kito dot cheng at gmail dot com, jimw at sifive dot com, joseph at codesourcery dot com, jakub at redhat dot com, dodji at redhat dot com
- Date: Fri, 16 Aug 2019 09:51:41 -0600
- 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>
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