Hello. 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.
It's quite similar to -fsanitize=recover and halt_on_error=0 situation: one has to enable both to really receive requested behavior. Ready to be installed? Thanks, Martin
>From 165a90fb7a8a91e9196f641ff644b38c4e1b7f94 Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Fri, 30 Sep 2016 10:07:17 +0200 Subject: [PATCH] Enhance document of asan-use-after-return param. gcc/ChangeLog: 2016-09-30 Martin Liska <mli...@suse.cz> * doc/invoke.texi: Document asan-use-after-return that it's disabled by default in runtime. --- gcc/doc/invoke.texi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8a84e4f..0121560 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -10034,6 +10034,10 @@ is enabled by default when using @option{-fsanitize=address} option. To disable use-after-return detection 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}. + @item asan-instrumentation-with-call-threshold If number of memory accesses in function being instrumented is greater or equal to this number, use callbacks instead of inline checks. -- 2.9.2