]> granicus.if.org Git - llvm/commitdiff
[ASan] Enable -asan-stack-dynamic-alloca by default.
authorAlexey Samsonov <vonosmas@gmail.com>
Thu, 5 Feb 2015 19:39:20 +0000 (19:39 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Thu, 5 Feb 2015 19:39:20 +0000 (19:39 +0000)
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

lib/Transforms/Instrumentation/AddressSanitizer.cpp

index 14289b114a9c4a132fe1b6965cc7756099bfda7d..3d14d8f0cfa0ed7f0ccb8d8a2dd96976fdfbe090 100644 (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,