mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
[ASan] emit instrumentation for initialization order checking by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177063 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41b55f5556
commit
b4ba5e68e1
@ -60,11 +60,11 @@ ModulePass *createGCOVProfilerPass(const GCOVOptions &Options =
|
|||||||
|
|
||||||
// Insert AddressSanitizer (address sanity checking) instrumentation
|
// Insert AddressSanitizer (address sanity checking) instrumentation
|
||||||
FunctionPass *createAddressSanitizerFunctionPass(
|
FunctionPass *createAddressSanitizerFunctionPass(
|
||||||
bool CheckInitOrder = false, bool CheckUseAfterReturn = false,
|
bool CheckInitOrder = true, bool CheckUseAfterReturn = false,
|
||||||
bool CheckLifetime = false, StringRef BlacklistFile = StringRef(),
|
bool CheckLifetime = false, StringRef BlacklistFile = StringRef(),
|
||||||
bool ZeroBaseShadow = false);
|
bool ZeroBaseShadow = false);
|
||||||
ModulePass *createAddressSanitizerModulePass(
|
ModulePass *createAddressSanitizerModulePass(
|
||||||
bool CheckInitOrder = false, StringRef BlacklistFile = StringRef(),
|
bool CheckInitOrder = true, StringRef BlacklistFile = StringRef(),
|
||||||
bool ZeroBaseShadow = false);
|
bool ZeroBaseShadow = false);
|
||||||
|
|
||||||
// Insert MemorySanitizer instrumentation (detection of uninitialized reads)
|
// Insert MemorySanitizer instrumentation (detection of uninitialized reads)
|
||||||
|
@ -244,7 +244,7 @@ static size_t RedzoneSizeForScale(int MappingScale) {
|
|||||||
|
|
||||||
/// AddressSanitizer: instrument the code in module to find memory bugs.
|
/// AddressSanitizer: instrument the code in module to find memory bugs.
|
||||||
struct AddressSanitizer : public FunctionPass {
|
struct AddressSanitizer : public FunctionPass {
|
||||||
AddressSanitizer(bool CheckInitOrder = false,
|
AddressSanitizer(bool CheckInitOrder = true,
|
||||||
bool CheckUseAfterReturn = false,
|
bool CheckUseAfterReturn = false,
|
||||||
bool CheckLifetime = false,
|
bool CheckLifetime = false,
|
||||||
StringRef BlacklistFile = StringRef(),
|
StringRef BlacklistFile = StringRef(),
|
||||||
@ -315,7 +315,7 @@ struct AddressSanitizer : public FunctionPass {
|
|||||||
|
|
||||||
class AddressSanitizerModule : public ModulePass {
|
class AddressSanitizerModule : public ModulePass {
|
||||||
public:
|
public:
|
||||||
AddressSanitizerModule(bool CheckInitOrder = false,
|
AddressSanitizerModule(bool CheckInitOrder = true,
|
||||||
StringRef BlacklistFile = StringRef(),
|
StringRef BlacklistFile = StringRef(),
|
||||||
bool ZeroBaseShadow = false)
|
bool ZeroBaseShadow = false)
|
||||||
: ModulePass(ID),
|
: ModulePass(ID),
|
||||||
|
@ -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 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"
|
target triple = "x86_64-unknown-linux-gnu"
|
||||||
@xxx = internal global i32 0, align 4 ; With dynamic initializer.
|
@xxx = internal global i32 0, align 4 ; With dynamic initializer.
|
||||||
|
Loading…
Reference in New Issue
Block a user