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