This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] changes.html - document -fsanitize-address-use-after-scope
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Cc: Martin Liška <mliska at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 Jan 2017 16:06:00 +0100
- Subject: Re: [wwwdocs] changes.html - document -fsanitize-address-use-after-scope
- Authentication-results: sourceware.org; auth=none
- References: <e0925c24-323c-8ce4-1a73-cacdbc5a6fb9@suse.cz> <5888BD83.6050206@foss.arm.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 25, 2017 at 03:00:19PM +0000, Kyrill Tkachov wrote:
> Hi Martin,
>
> On 25/01/17 14:54, Martin Liška wrote:
> > Hello.
> >
> > Following patch documents new option -fsanitize-address-use-after-scope which was done for upcoming GCC 7.1.
> >
> > Thanks for feedback,
> > Martin
>
> + <li>Using -O2 optimization level (and above) rewrites variables of a GIMPLE
> + type that are rewritten into SSA. This removes shadow memory usage and
> + results in faster code.</li>
>
> I believe the changes page is targeted towards end users rather than GCC developers
> and the above description wouldn't make much sense to them. Maybe better to say:
> "Using -O2 optimization level and above improves shadow memory usage over LLVM" ?
It isn't even correct, we only rewrite vars into SSA that aren't address
taken except for the implicit address taking by ASAN_MARK. It is just an
implementation detail, I think we just should leave it out, it is up to users
to compare our and LLVM -fsanitize=address performance and what it can
report if they want. What you should mention is that -fsanitize-address-use-after-scope
is on by default if -fsanitize=address and not when
-fsanitize=kernel-address.
Jakub