[ASan] Enable -asan-stack-dynamic-alloca by default.

By default, store all local variables in dynamic alloca instead of
static one. It reduces the stack space usage in use-after-return mode
(dynamic alloca will not be called if the local variables are stored
in a fake stack), and improves the debug info quality for local
variables (they will not be described relatively to %rbp/%rsp, which
are assumed to be clobbered by function calls).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228336 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexey Samsonov 2015-02-05 19:39:20 +00:00
parent a4ed04095c
commit 639e3cd880

View File

@ -189,7 +189,7 @@ static cl::opt<bool> ClCheckLifetime("asan-check-lifetime",
static cl::opt<bool> ClDynamicAllocaStack(
"asan-stack-dynamic-alloca",
cl::desc("Use dynamic alloca to represent stack variables"), cl::Hidden,
cl::init(false));
cl::init(true));
// Debug flags.
static cl::opt<int> ClDebug("asan-debug", cl::desc("debug"), cl::Hidden,