This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv5][Kasan] Allow to override Asan shadow offset from command line
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>, Ian Lance Taylor <ian at airs dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, Dmitry Vyukov <dvyukov at google dot com>, Andrey Ryabinin <a dot ryabinin at samsung dot com>
- Date: Fri, 24 Oct 2014 16:02:51 +0200
- Subject: Re: [PATCHv5][Kasan] Allow to override Asan shadow offset from command line
- Authentication-results: sourceware.org; auth=none
- References: <540DBD37 dot 9060702 at samsung dot com> <5416B566 dot 2000601 at samsung dot com> <5429951B dot 90900 at samsung dot com> <5440CADD dot 6060100 at samsung dot com> <544A5A95 dot 6030502 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Oct 24, 2014 at 05:56:37PM +0400, Yury Gribov wrote:
> >From 1882c41de6c8ae53b7e199b3cc655b6f4b31e8fb Mon Sep 17 00:00:00 2001
> From: Yury Gribov <y.gribov@samsung.com>
> Date: Thu, 16 Oct 2014 18:31:10 +0400
> Subject: [PATCH 1/2] Add strtoll and strtoull to libiberty.
>
> 2014-10-20 Yury Gribov <y.gribov@samsung.com>
>
> include/
> * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes.
>
> libiberty/
> * strtoll.c: New file.
> * strtoull.c: New file.
> * configure.ac: Add long long checks. Add harness for strtoll and
> strtoull. Check decls for strtol, strtoul, strtoll, strtoull.
> * Makefile.in (CFILES, CONFIGURED_OFILES): Added strtoll and strtoull.
> * config.in: Regenerate.
> * configure: Regenerate.
> * functions.texi: Regenerate.
> * testsuite/Makefile.in (check-strtol): New rule.
> (test-strtol): Likewise.
> (mostlyclean): Clean up strtol test.
> * testsuite/test-strtol.c: New test.
Ian, can you please review this?
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -883,6 +883,10 @@ fsanitize=
> Common Driver Report Joined
> Select what to sanitize
>
> +fasan-shadow-offset=
> +Common Joined RejectNegative Var(common_deferred_options) Defer
> +-fasan-shadow-offset=<string> Use custom shadow memory offset.
Shouldn't that be =<number> or =<address> instead of string?
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -297,7 +297,7 @@ Objective-C and Objective-C++ Dialects}.
> @xref{Debugging Options,,Options for Debugging Your Program or GCC}.
> @gccoptlist{-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol
> -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol
> --fsanitize-undefined-trap-on-error @gol
> +-fasan-shadow-offset=@var{string} -fsanitize-undefined-trap-on-error @gol
Likewise here, @var{number} instead.
> -fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
> -fdisable-ipa-@var{pass_name} @gol
> -fdisable-rtl-@var{pass_name} @gol
> @@ -5642,6 +5642,12 @@ While @option{-ftrapv} causes traps for signed overflows to be emitted,
> @option{-fsanitize=undefined} gives a diagnostic message.
> This currently works only for the C family of languages.
>
> +@item -fasan-shadow-offset=@var{string}
And here.
Otherwise looks good to me.
Jakub