asan.h (asan_sanitize_allocas_p): Declare.
gcc/
* asan.h (asan_sanitize_allocas_p): Declare.
* asan.c (asan_sanitize_allocas_p): New function.
(handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
(handle_builtin_alloca): Likewise.
* cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
if !asan_sanitize_allocas_p.
* params.def (asan-instrument-allocas): Add new option.
* params.h (ASAN_PROTECT_ALLOCAS): Define.
* opts.c (common_handle_option): Disable allocas sanitization for
KASan by default.
gcc/testsuite/
* c-c++-common/asan/kasan-alloca-1.c: New test.
* c-c++-common/asan/kasan-alloca-2.c: Likewise.
From-SVN: r250032