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: Martin Liška <mliska at suse dot cz>
- Cc: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 26 Jan 2017 14:19:14 +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> <20170125150600.GP1867@tucnak> <6a69babb-5302-83ef-08d4-4bf9d1837f77@suse.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jan 26, 2017 at 02:04:00PM +0100, Martin Liška wrote:
> + The option is enabled with <code>-fsanitize=address</code> and disabled
s/enabled/& by default/
s/disabled/& by default/
> + with <code>-fsanitize=kernel-address</code>.
> + Compared to the LLVM compiler, where the option already exists,
> + the implementation in the GCC compiler has couple of improvements and advantages:
> + <ul>
> + <li>A complex usage of gotos and case labels are properly handled and should not
> + report any false positive or false negatives.
> + </li>
> + <li>Shadow memory poisoning (and unpoisoning) is optimized out in common situations
> + where the call is not needed.
> + </li>
> + <li>C++ temporaries are sanitized.</li>
> + <li>Sanitization can handle invalid memory stores that are optimized out
> + by the LLVM compiler when using an optimization level.</li>
Have you verified it is true on the LLVM side (i.e. that they mishandle
gotos or case labels, that they don't optimize away memory
poisoning/unpoisoning in cases where gcc does, that they don't sanitize C++
temporaries and that for optimized out invalid memory stores they don't
sanitize them?
Jakub