This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope
- From: Martin LiÅka <mliska at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>, Yury Gribov <y dot gribov at samsung dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 May 2016 17:03:30 +0200
- Subject: Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope
- Authentication-results: sourceware.org; auth=none
- References: <572C7A3E dot 4000905 at suse dot cz> <572C848E dot 9020705 at samsung dot com> <20160506123857 dot GI26501 at tucnak dot zalov dot cz> <572CA8B6 dot 4040203 at samsung dot com> <20160506143931 dot GL26501 at tucnak dot zalov dot cz>
On 05/06/2016 04:39 PM, Jakub Jelinek wrote:
> Depends on how exactly it is defined. It could be enabling just its own
> sanitizer bit and nothing else, then users would need to use
> -fsanitize=address,use-after-scope
> or
> -fsanitize=kernel-address,use-after-scope
I'm inclined to the second option, where the new option would be automatically
added if a ADDRESS sanitizer is enabled (SANITIZE_{USER,KERNEL}_ADDRESS):
Is it acceptable behavior?
> (order doesn't matter), or it could enable the SANITIZE_ADDRESS
> bit together with its own, and then we'd just post-option processing
> (where we e.g. reject address,kernel-address) default to
> SANITIZE_USER_ADDRESS if SANITIZE_ADDRESS is on together with
> SANITIZE_USE_AFTER_SCOPE, but neither SANITIZE_{USER,KERNEL}_ADDRESS
> is defined.
> -fsanitize=address -fno-sanitize=use-after-scope
> obviously shouldn't in any case disable SANITIZE_ADDRESS, similarly
> -fsanitize=kernel-address -fno-sanitize=use-after-scope
>
> Jakub