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: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Marek Polacek <polacek at redhat dot com>, gcc-patches at gcc dot gnu dot org, Alexey Samsonov <samsonov at google dot com>, Dmitry Vyukov <dvyukov at google dot com>, Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- Date: Wed, 22 Oct 2014 12:00:18 +0200
- 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> <544763CA dot 7090908 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 22, 2014 at 11:59:06AM +0400, Yury Gribov wrote:
> >(in some cases for
> >the kind that is enabled with -fsanitize= only, in other cases
> >perhaps for something covering that and some other options),
>
> Depending on what? I've just passed contents of -fsanitize= to
> -fsanitize-recover=, seems to work fine.
I meant pick randomly a few testcases where you -fno-sanitize-recover=
a superset of what is specified in -fsanitize= , but it is not a big deal.
> 2014-10-22 Jakub Jelinek <jakub@redhat.com>
> Yury Gribov <y.gribov@samsung.com>
>
> gcc/
> * common.opt (flag_sanitize_recover): New variable.
> (fsanitize-recover): Remove Var/Init, deprecate.
> (fsanitize-recover=): New option.
> * doc/invoke.texi (fsanitize-recover): Update docs.
> * opts.c (finish_options): Use opts->x_flag_sanitize
> instead of flag_sanitize. Prohibit -fsanitize-recover
> for anything besides UBSan. Formatting.
> (common_handle_option): Handle OPT_fsanitize_recover_
> and OPT_fsanitize_recover. Use opts->x_flag_sanitize
> instead of flag_sanitize.
> * asan.c (pass_sanopt::execute): Fix up formatting.
> * ubsan.c (ubsan_expand_bounds_ifn, ubsan_expand_null_ifn,
> ubsan_expand_objsize_ifn, ubsan_build_overflow_builtin,
> instrument_bool_enum_load, ubsan_instrument_float_cast,
> instrument_nonnull_arg, instrument_nonnull_return): Check
> bits in flag_sanitize_recover bitmask instead of
> flag_sanitize_recover as bool flag.
>
> gcc/c-family/
> * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
> ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
> instead of flag_sanitize_recover as bool flag.
>
> gcc/testsuite/
> * c-c++-common/ubsan/align-1.c: Updated cmdline options.
> * c-c++-common/ubsan/align-3.c: Likewise.
> * c-c++-common/ubsan/bounds-1.c: Likewise.
> * c-c++-common/ubsan/div-by-zero-7.c: Likewise.
> * c-c++-common/ubsan/float-cast-overflow-10.c: Likewise.
> * c-c++-common/ubsan/float-cast-overflow-7.c: Likewise.
> * c-c++-common/ubsan/float-cast-overflow-8.c: Likewise.
> * c-c++-common/ubsan/float-cast-overflow-9.c: Likewise.
> * c-c++-common/ubsan/nonnull-2.c: Likewise.
> * c-c++-common/ubsan/nonnull-3.c: Likewise.
> * c-c++-common/ubsan/object-size-3.c: Likewise.
> * c-c++-common/ubsan/overflow-1.c: Likewise.
> * c-c++-common/ubsan/overflow-add-1.c: Likewise.
> * c-c++-common/ubsan/overflow-add-3.c: Likewise.
> * c-c++-common/ubsan/overflow-mul-1.c: Likewise.
> * c-c++-common/ubsan/overflow-mul-3.c: Likewise.
> * c-c++-common/ubsan/overflow-negate-2.c: Likewise.
> * c-c++-common/ubsan/overflow-sub-1.c: Likewise.
> * c-c++-common/ubsan/pr59503.c: Likewise.
> * c-c++-common/ubsan/pr60613-1.c: Likewise.
> * c-c++-common/ubsan/save-expr-1.c: Likewise.
> * c-c++-common/ubsan/shift-3.c: Likewise.
> * c-c++-common/ubsan/shift-6.c: Likewise.
> * c-c++-common/ubsan/undefined-1.c: Likewise.
> * c-c++-common/ubsan/vla-2.c: Likewise.
> * c-c++-common/ubsan/vla-3.c: Likewise.
> * c-c++-common/ubsan/vla-4.c: Likewise.
> * g++.dg/ubsan/cxx11-shift-1.C: Likewise.
> * g++.dg/ubsan/return-2.C: Likewise.
> * c-c++-common/ubsan/recovery-1.c: New test.
> * c-c++-common/ubsan/recovery-2.c: New test.
> * c-c++-common/ubsan/recovery-3.c: New test.
> * c-c++-common/ubsan/recovery-common.inc: New file.
Ok, thanks.
Jakub