[llvm] r177063 - [ASan] emit instrumentation for initialization order checking by default
Alexey Samsonov
samsonov at google.com
Thu Mar 14 05:38:58 PDT 2013
Author: samsonov
Date: Thu Mar 14 07:38:58 2013
New Revision: 177063
URL: http://llvm.org/viewvc/llvm-project?rev=177063&view=rev
Log:
[ASan] emit instrumentation for initialization order checking by default
Modified:
llvm/trunk/include/llvm/Transforms/Instrumentation.h
llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/trunk/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll
Modified: llvm/trunk/include/llvm/Transforms/Instrumentation.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Instrumentation.h?rev=177063&r1=177062&r2=177063&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Instrumentation.h (original)
+++ llvm/trunk/include/llvm/Transforms/Instrumentation.h Thu Mar 14 07:38:58 2013
@@ -60,11 +60,11 @@ ModulePass *createGCOVProfilerPass(const
// Insert AddressSanitizer (address sanity checking) instrumentation
FunctionPass *createAddressSanitizerFunctionPass(
- bool CheckInitOrder = false, bool CheckUseAfterReturn = false,
+ bool CheckInitOrder = true, bool CheckUseAfterReturn = false,
bool CheckLifetime = false, StringRef BlacklistFile = StringRef(),
bool ZeroBaseShadow = false);
ModulePass *createAddressSanitizerModulePass(
- bool CheckInitOrder = false, StringRef BlacklistFile = StringRef(),
+ bool CheckInitOrder = true, StringRef BlacklistFile = StringRef(),
bool ZeroBaseShadow = false);
// Insert MemorySanitizer instrumentation (detection of uninitialized reads)
Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=177063&r1=177062&r2=177063&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Thu Mar 14 07:38:58 2013
@@ -244,7 +244,7 @@ static size_t RedzoneSizeForScale(int Ma
/// AddressSanitizer: instrument the code in module to find memory bugs.
struct AddressSanitizer : public FunctionPass {
- AddressSanitizer(bool CheckInitOrder = false,
+ AddressSanitizer(bool CheckInitOrder = true,
bool CheckUseAfterReturn = false,
bool CheckLifetime = false,
StringRef BlacklistFile = StringRef(),
@@ -315,7 +315,7 @@ struct AddressSanitizer : public Functio
class AddressSanitizerModule : public ModulePass {
public:
- AddressSanitizerModule(bool CheckInitOrder = false,
+ AddressSanitizerModule(bool CheckInitOrder = true,
StringRef BlacklistFile = StringRef(),
bool ZeroBaseShadow = false)
: ModulePass(ID),
Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll?rev=177063&r1=177062&r2=177063&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll (original)
+++ llvm/trunk/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll Thu Mar 14 07:38:58 2013
@@ -1,4 +1,4 @@
-; RUN: opt < %s -asan -asan-module -asan-initialization-order -S | FileCheck %s
+; RUN: opt < %s -asan -asan-module -S | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
@xxx = internal global i32 0, align 4 ; With dynamic initializer.
More information about the llvm-commits
mailing list