This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, DOC] Enhance document of asan-use-after-return param.
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>
- Date: Sun, 26 Feb 2017 23:10:32 +0100 (CET)
- Subject: Re: [PATCH, DOC] Enhance document of asan-use-after-return param.
- Authentication-results: sourceware.org; auth=none
- References: <22f41484-d67d-dfa7-a5b4-03ebb783433b@suse.cz>
On Fri, 30 Sep 2016, Martin Liška wrote:
> Even though we enable by default asan-use-after-return parameter (when
> -fsanitize=address is selected), the runtime does not check use after
> return by default. I would consider it useful to document.
Yes, definitely, thank you.
I noticed a few changes that would make sense of top of this
(adding "the" and "option" as well as simplifying the language
a bit), and committed the follow-up patch below.
Committed.
Gerald
2017-02-26 Gerald Pfeifer <gerald@pfeifer.com>
* doc/invoke.texi (Optimize Options): Refine the description
of asan-use-after-return.
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi (revision 245741)
+++ doc/invoke.texi (working copy)
@@ -10468,13 +10468,12 @@
@item asan-use-after-return
Enable detection of use-after-return. This kind of protection
-is enabled by default when using @option{-fsanitize=address} option.
-To disable use-after-return detection use
-@option{--param asan-use-after-return=0}.
+is enabled by default when using the @option{-fsanitize=address} option.
+To disable it use @option{--param asan-use-after-return=0}.
-Note: The check is disabled by default at runtime. To enable the check,
-you should set environment variable @env{ASAN_OPTIONS} to
-@code{detect_stack_use_after_return=1}.
+Note: By default the check is disabled at run time. To enable it,
+add @code{detect_stack_use_after_return=1} to the environment variable
+@env{ASAN_OPTIONS}.
@item asan-instrumentation-with-call-threshold
If number of memory accesses in function being instrumented