2016-12-08 Dmitry Vyukov <dvyukov@google.com>
* opts.c (finish_options): Enable
-fsanitize-address-use-after-scope only if -fsanitize=address is enabled
(not -fsanitize=kernel-address).
* doc/invoke.texi (-fsanitize=kernel-address):
Don't say that it enables -fsanitize-address-use-after-scope.
From-SVN: r243441
+2016-12-08 Dmitry Vyukov <dvyukov@google.com>
+
+ * opts.c (finish_options): Enable
+ -fsanitize-address-use-after-scope only if -fsanitize=address is enabled
+ (not -fsanitize=kernel-address).
+ * doc/invoke.texi (-fsanitize=kernel-address):
+ Don't say that it enables -fsanitize-address-use-after-scope.
+
2016-12-08 Bin Cheng <bin.cheng@arm.com>
PR middle-end/78684
@item -fsanitize=kernel-address
@opindex fsanitize=kernel-address
Enable AddressSanitizer for Linux kernel.
-The option enables @option{-fsanitize-address-use-after-scope}.
See @uref{https://github.com/google/kasan/wiki} for more details.
@item -fsanitize=thread
/* Enable -fsanitize-address-use-after-scope if address sanitizer is
enabled. */
- if (opts->x_flag_sanitize
+ if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS)
&& !opts_set->x_flag_sanitize_address_use_after_scope)
opts->x_flag_sanitize_address_use_after_scope = true;