This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] -fsanitize-recover=list
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexey Samsonov <samsonov at google dot com>
- Cc: Yury Gribov <y dot gribov at samsung dot com>, Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Dmitry Vyukov <dvyukov at google dot com>, Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- Date: Tue, 18 Nov 2014 07:47:40 +0100
- Subject: Re: [PATCH] -fsanitize-recover=list
- Authentication-results: sourceware.org; auth=none
- References: <CAGQ9bdyWWNMt4m9jO2N1nzvVFjVuT1zbyey362WvnMxJZmNkBw at mail dot gmail dot com> <20140930054027 dot GJ17454 at tucnak dot redhat dot com> <542A56C0 dot 2030506 at samsung dot com> <CAGSYnCNTqXyWTHQERJe1t2uiNmOYGTMcU761Zs8N1DxUpZQnYw at mail dot gmail dot com> <20140930173340 dot GI1986 at tucnak dot redhat dot com> <CAGSYnCMCMUPhttwyPMjSmpiim2U26cD6ef7sc9KdP9tRkZu7uQ at mail dot gmail dot com> <20140930173913 dot GJ1986 at tucnak dot redhat dot com> <543BADAB dot 4090000 at samsung dot com> <20141017161334 dot GF10376 at tucnak dot redhat dot com> <CAGSYnCMEeTWES+9wzOir6hSXzAdvoQZYWOzd8JURbAfURXhXqA at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Nov 17, 2014 at 06:40:00PM -0800, Alexey Samsonov wrote:
> I've just prepared a patch implementing -fsanitize-recover=<list> in
> Clang (http://reviews.llvm.org/D6302), writing here to make sure we're
> on
> the same page w.r.t. flag semantics:
>
> * -fsanitize-recover: Enable recovery for all checks enabled by
> -fsanitize= which support it.
> * -fno-sanitize-recover: Disable recovery for all checks.
That is not what I think we've agreed on and what is implemented in GCC.
-fsanitize-recover only enables recovery of the undefined plus
undefined-like sanitizers, in particular it doesn't enable recover from
kernel-address, because -fsanitize-recover should be a deprecated option
and kernel-address never used it before.
So, in GCC -fsanitize-recover stands for
-fsanitize-recover=undefined,float-divide-by-zero,float-cast-overflow
and -fno-sanitize-recover stands for
-fno-sanitize-recover=undefined,float-divide-by-zero,float-cast-overflow
> * -fsanitize-recover=<list>: Enable recovery for all selected checks
> or group of checks. It is forbidden to list unrecoverable sanitizers
> here (e.g., "-fsanitize-recover=address" will produce an error).
We only error on
-fsanitize-recover=address
-fsanitize-recover=thread
-fsanitize-recover=leak
but not say on
-fsanitize-recover=unreachable
which is part of undefined; unreachable isn't recoverable silently.
Likewise -fsanitize-recover=return. Otherwise one couldn't use
-fsanitize-recover=undefined which is useful.
> * -fno-sanitize-recover=<list>: Disable recovery for selected checks
> or group of checks.
Jakub