This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv3][PING] Enable -fsanitize-recover for KASan
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexey Samsonov <samsonov at google dot com>
- Cc: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, Yury Gribov <y dot gribov at samsung dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Dmitry Vyukov <dvyukov at google dot com>, Andrey Ryabinin <a dot ryabinin at samsung dot com>, Konstantin Khlebnikov <k dot khlebnikov at samsung dot com>
- Date: Tue, 30 Sep 2014 01:17:20 +0200
- Subject: Re: [PATCHv3][PING] Enable -fsanitize-recover for KASan
- Authentication-results: sourceware.org; auth=none
- References: <54095E23 dot 6050900 at samsung dot com> <5416B3A2 dot 4050200 at samsung dot com> <54299507 dot 7090800 at samsung dot com> <20140929174357 dot GH17454 at tucnak dot redhat dot com> <CAGQ9bdzcCO6CfQ7nG+xeAh63fs-GASiTExTvZfjJtMA67_4feQ at mail dot gmail dot com> <CAGSYnCPwbgZ++2Jt2vE6-ytveSJwSQPZT5umLeKPVWsVjWzwPQ at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Sep 29, 2014 at 03:36:20PM -0700, Alexey Samsonov wrote:
> -fasan-recover doesn't look like a good idea - for instance, in Clang, we
> never use "?san"
> in flag names, preferring -fsanitize-whatever. What's the rationale behind
> splitting
> -fsanitize-recover in two flags (ASan- and UBSan- specific)?
> Is there no way to keep a single -f(no-)sanitize-recover for that purpose?
> Now it works
> only for UBSan checks, but we may extend it to another sanitizers as well.
The problem is that if we start using it for ASan, it needs to have a
different default, because ASan wants to abort by default, while UBSan
recover by default. -fsanitize=kernel-address w (KASan) wants to recover
by default. So, the option is either to never support recover for
-fsanitize=address, for ubsan keep -fsanitize-recover (by default) as is
and for kasan use that same switch, or have separate flags.
Jakub