/external/compiler-rt/test/msan/ |
D | dtor-vtable.cc | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 7 // RUN: %clangxx_msan %s -DVPTRA=1 -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && … 9 // RUN: %clangxx_msan %s -DVPTRCA=1 -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t &&… 11 // RUN: %clangxx_msan %s -DVPTRCB=1 -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t &&… 13 // RUN: %clangxx_msan %s -DVPTRC=1 -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && … 45 a->~A(); in main() 49 a->A_Foo(); in main() 53 c->~C(); in main() [all …]
|
D | dtor-vtable-multiple-inheritance.cc | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 7 // RUN: %clangxx_msan %s -DCVPTR=1 -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && … 9 // RUN: %clangxx_msan %s -DEAVPTR=1 -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t &&… 11 // RUN: %clangxx_msan %s -DEDVPTR=1 -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t &&… 21 this->A_Foo(); in ~A() 56 c->~C(); in main() 59 c->A_Foo(); in main() 64 e->~E(); in main() [all …]
|
D | use-after-dtor.cc | 1 // RUN: %clangxx_msan %s -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIONS=p… 4 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 7 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 10 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -fsanitize-memory-t… 11 // RUN: FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out 33 s->~Simple(); in main() 35 return s->x_; in main() 37 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value in main() 38 // CHECK: {{#0 0x.* in main.*use-after-dtor.cc:}}[[@LINE-3]] in main() 40 // CHECK-ORIGINS: Memory was marked as uninitialized in main() [all …]
|
D | dtor-member.cc | 1 // RUN: %clangxx_msan %s -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIONS=p… 4 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 7 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 10 // RUN: %clangxx_msan %s -fsanitize=memory -o %t && MSAN_OPTIONS=poison_in_dtor=1 %run %t >%t.out … 11 // RUN: FileCheck %s --check-prefix=CHECK-NO-FLAG < %t.out 13 // RUN: %clangxx_msan -fsanitize=memory -fsanitize-memory-use-after-dtor %s -o %t && MSAN_OPTIONS=p… 14 // RUN: FileCheck %s --check-prefix=CHECK-NO-FLAG < %t.out 34 // memory location &buf. Since objects made in this way must be explicitly in main() 38 s->~Simple(); in main() 40 if (__msan_test_shadow(s, sizeof(*s)) != -1) in main() [all …]
|
D | dtor-bit-fields.cc | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 10 // TODO: remove empty dtors when msan use-after-dtor poisons 50 p->~Packed(); in main() 52 assert(__msan_test_shadow(((char*)p) + i, sizeof(char)) != -1); in main() 53 assert(__msan_test_shadow(&p->d, sizeof(double)) != -1); in main() 54 assert(__msan_test_shadow(((char*)(&p->d)) + sizeof(double), sizeof(char)) != in main() 55 -1); in main() 58 e->~Empty(); in main() [all …]
|
D | dtor-trivial.cpp | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 33 nt->~NonTrivial(); in main() 34 assert(__msan_test_shadow(nt, sizeof(*nt)) != -1); in main() 37 t->~Trivial(); in main() 38 assert(__msan_test_shadow(t, sizeof(*t)) != -1); in main()
|
D | dtor-derived-class.cc | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 2 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 22 d->~Derived(); in main() 26 assert(__msan_test_shadow(&d, sizeof(d)) == -1); in main() 27 assert(__msan_test_shadow(&d->x, sizeof(d->x)) != -1); in main() 28 assert(__msan_test_shadow(&d->y, sizeof(d->y)) != -1); in main() 31 b->~Base(); in main() 35 assert(__msan_test_shadow(&b, sizeof(b)) == -1); in main() 36 assert(__msan_test_shadow(&b->x, sizeof(b->x)) != -1); in main()
|
D | dtor-base-access.cc | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 31 assert(__msan_test_shadow(&this->x_ptr, sizeof(this->x_ptr)) == -1); in ~Base() 33 assert(__msan_test_shadow(this->x_ptr, sizeof(*this->x_ptr)) != -1); in ~Base() 38 assert(__msan_test_shadow(&this->y, sizeof(this->y)) == -1); in ~Derived() 40 assert(__msan_test_shadow(&this->x_ptr, sizeof(this->x_ptr)) == -1); in ~Derived() 45 assert(__msan_test_shadow(&d->x_ptr, sizeof(d->x_ptr)) == -1); in main() 46 d->~Derived(); in main() 47 assert(__msan_test_shadow(&d->x_ptr, sizeof(d->x_ptr)) != -1); in main()
|
D | dtor-trivial-class-members.cc | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 17 assert(__msan_test_shadow(&this->size, sizeof(this->size)) == -1); in ~Vector() 36 assert(__msan_test_shadow(&derived_a, sizeof(derived_a)) == -1); in ~Derived() 37 assert(__msan_test_shadow(&derived_v1, sizeof(derived_v1)) == -1); in ~Derived() 38 assert(__msan_test_shadow(&derived_v2, sizeof(derived_v2)) == -1); in ~Derived() 39 assert(__msan_test_shadow(&derived_b, sizeof(derived_b)) == -1); in ~Derived() 40 assert(__msan_test_shadow(&derived_c, sizeof(derived_c)) == -1); in ~Derived() 46 d->~Derived(); in main() [all …]
|
D | dtor-multiple-inheritance.cc | 8 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 10 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 12 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 27 assert(__msan_test_shadow(&this->x, sizeof(this->x) == -1)); in ~A() 28 // Memory owned by subclasses is poisoned. in ~A() 29 assert(__msan_test_shadow(temp_y, sizeof(*temp_y)) != -1); in ~A() 30 assert(__msan_test_shadow(temp_z, sizeof(*temp_z)) != -1); in ~A() 31 assert(__msan_test_shadow(temp_w, sizeof(*temp_w)) != -1); in ~A() 40 assert(__msan_test_shadow(&this->y, sizeof(this->y)) == -1); in ~B() 41 // Memory accessible via vtable still reachable. in ~B() [all …]
|
D | dtor-multiple-inheritance-nontrivial-class-members.cc | 1 // RUN: %clangxx_msan %s -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 3 // RUN: %clangxx_msan %s -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 5 // RUN: %clangxx_msan %s -O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIO… 14 assert(__msan_test_shadow(&this->size, sizeof(this->size)) == -1); in ~Vector() 30 this->intermediate_a_ptr = intermediate_a; in set_ptr() 33 assert(__msan_test_shadow(&virtual_v, sizeof(virtual_v)) == -1); in ~VirtualBase() 34 assert(__msan_test_shadow(&virtual_a, sizeof(virtual_a)) == -1); in ~VirtualBase() 37 sizeof(*intermediate_a_ptr)) != -1); in ~VirtualBase() 47 assert(__msan_test_shadow(&this->intermediate_a, in ~Intermediate() 48 sizeof(this->intermediate_a)) == -1); in ~Intermediate() [all …]
|
/external/clang/test/CodeGenCXX/ |
D | sanitize-dtor-tail-call.cpp | 1 // Test -fsanitize-memory-use-after-dtor 2 …UN: %clang_cc1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++11 … 3 …: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1… 16 // Simple internal member is poisoned by compiler-generated dtor 17 // CHECK: define {{.*}}SimpleD2Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] 19 // CHECK-NOT: call void @__sanitizer_dtor_callback 23 // CHECK: attributes [[ATTRIBUTE]] = {{.*}}"disable-tail-calls"="true"
|
D | sanitize-dtor-trivial.cpp | 1 // Test -fsanitize-memory-use-after-dtor 2 …: %clang_cc1 -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1… 3 …: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1…
|
D | sanitize-dtor-repress-aliasing.cpp | 1 // Test -fsanitize-memory-use-after-dtor 2 // RUN: %clang_cc1 -fsanitize=memory -O1 -fsanitize-memory-use-after-dtor -std=c++11 -triple=x86_64… 3 // RUN: %clang_cc1 -fsanitize=memory -O2 -fsanitize-memory-use-after-dtor -std=c++11 -triple=x86_64…
|
D | sanitize-dtor-vtable.cpp | 1 …: %clang_cc1 -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1… 2 …: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1… 20 // CHECK-LABEL: define {{.*}}AD1Ev 21 // CHECK-NOT: call void @__sanitizer_dtor_callback 23 // CHECK-NOT: call void @__sanitizer_dtor_callback 26 // After invoking base dtor and dtor for virtual base, poison vtable ptr. 27 // CHECK-LABEL: define {{.*}}BD1Ev 28 // CHECK-NOT: call void @__sanitizer_dtor_callback 30 // CHECK-NOT: call void @__sanitizer_dtor_callback 33 // CHECK-NOT: call void @__sanitizer_dtor_callback [all …]
|
D | sanitize-dtor-bit-field.cpp | 1 // Test -fsanitize-memory-use-after-dtor 2 …: %clang_cc1 -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1… 3 …: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1… 66 // CHECK-LABEL: define {{.*}}PackedD2Ev 70 // CHECK-LABEL: define {{.*}}EmptyD2Ev 71 // CHECK-NOT: call void @__sanitizer_dtor_callback{{.*}}i64 0 74 // CHECK-LABEL: define {{.*}}SimpleD2Ev 78 // CHECK-LABEL: define {{.*}}AnonD2Ev 82 // CHECK-LABEL: define {{.*}}AdjacentD2Ev
|
D | sanitize-dtor-callback.cpp | 1 // Test -fsanitize-memory-use-after-dtor 2 // RUN: %clang_cc1 -fsanitize=memory -fsanitize-memory-use-after-dtor -std=c++11 -triple=x86_64-pc-… 4 // Sanitizing dtor is emitted in dtor for every class, and only 12 // Simple internal member is poisoned by compiler-generated dtor 13 // CHECK-LABEL: define {{.*}}SimpleD1Ev 22 // Simple internal member is poisoned by compiler-generated dtor 23 // CHECK-LABEL: define {{.*}}InlinedD1Ev 36 // CHECK-LABEL: define {{.*}}create_def_trivial 37 // CHECK-NOT: call {{.*}}Defaulted_Trivial 45 // Explicitly compiler-generated dtor poisons object. [all …]
|
D | sanitize-dtor-derived-class.cpp | 1 …UN: %clang_cc1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++11 … 2 …: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++1… 4 // Base dtor poisons members 5 // Complete dtor poisons vtable ptr after destroying members and 33 // CHECK-LABEL: define {{.*}}DerivedD1Ev 34 // CHECK-NOT: call void @__sanitizer_dtor_callback 36 // CHECK-NOT: call void @__sanitizer_dtor_callback 39 // CHECK-LABEL: define {{.*}}DerivedD0Ev 40 // CHECK-NOT: call void @__sanitizer_dtor_callback 42 // CHECK-NOT: call void @__sanitizer_dtor_callback [all …]
|
D | sanitize-dtor-fn-attribute.cpp | 1 // Test -fsanitize-memory-use-after-dtor 2 // RUN: %clang_cc1 -fsanitize=memory -fsanitize-memory-use-after-dtor -std=c++11 -triple=x86_64-pc-… 22 ns->~No_San(); in main() 28 // CHECK: define {{.*}}No_SanD1Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] 29 // CHECK-NOT: call void {{.*}}sanitizer_dtor_callback 32 // CHECK: define {{.*}}No_SanD2Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] 33 // CHECK-NOT: call void {{.*}}sanitizer_dtor_callback 35 // CHECK-NOT: call void {{.*}}sanitizer_dtor_callback 43 // CHECK-NOT: attributes [[ATTRIBUTE]] = {{.*}} sanitize_memory
|
D | sanitize-dtor-nontrivial-virtual-base.cpp | 1 // RUN: %clang_cc1 -fsanitize=memory -O0 -fsanitize-memory-use-after-dtor -std=c++11 -triple=x86_64… 2 // RUN: %clang_cc1 -fsanitize=memory -O1 -fsanitize-memory-use-after-dtor -std=c++11 -triple=x86_64… 48 // CHECK-LABEL: define {{.*}}ZN7DerivedD1Ev 52 // CHECK-LABEL: define {{.*}}ZN7DerivedD0Ev 55 // CHECK-LABEL: define {{.*}}ZN11VirtualBaseD1Ev 58 // CHECK-LABEL: define {{.*}}ZN11VirtualBaseD0Ev 62 // CHECK-LABEL: define {{.*}}ZN11VirtualBaseD2Ev 67 // CHECK-LABEL: define {{.*}}ZN4BaseD2Ev 72 // CHECK-LABEL: define {{.*}}ZN7DerivedD2Ev 80 // CHECK-LABEL: define {{.*}}ZN6VectorIiED2Ev
|
D | sanitize-no-dtor-callback.cpp | 1 // Test without the flag -fsanitize-memory-use-after-dtor, to ensure that 3 // RUN: %clang_cc1 -fsanitize=memory -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s 9 // CHECK-LABEL: define {{.*}}SimpleD1Ev 10 // CHECK-NOT: call void @__sanitizer_dtor_callback 16 // CHECK-LABEL: define {{.*}}InlinedD1Ev 17 // CHECK-NOT: call void @__sanitizer_dtor_callback 19 // CHECK-LABEL: define {{.*}}SimpleD2Ev 20 // CHECK-NOT: call void @__sanitizer_dtor_callback 22 // CHECK-LABEL: define {{.*}}InlinedD2Ev 23 // CHECK-NOT: call void @__sanitizer_dtor_callback
|
/external/grpc-grpc/tools/ |
D | bazel.rc | 1 build --client_env=CC=clang 2 build --copt -DGRPC_BAZEL_BUILD 4 build:opt --copt -Wframe-larger-than=16384 6 build:asan --strip=never 7 build:asan --copt -fsanitize-coverage=edge 8 build:asan --copt -fsanitize=address 9 build:asan --copt -O0 10 build:asan --copt -fno-omit-frame-pointer 11 build:asan --copt -DGPR_NO_DIRECT_SYSCALLS 12 build:asan --linkopt -fsanitize=address [all …]
|
/external/clang/test/Driver/ |
D | fsanitize.c | 1 …UN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined %s -### 2>&1 | … 2 …-target x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined -fno-sanitize-trap=signed-… 3 …clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-undefined-trap-on-error %s -### 2>&… 4 …ang -target x86_64-linux-gnu -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error %s -### … 5 …ang -target x86_64-linux-gnu -fsanitize-undefined-trap-on-error -fsanitize=undefined-trap %s -### … 6 …-UNDEFINED-TRAP: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|float-divide-by-ze… 7 …-UNDEFINED-TRAP: "-fsanitize-trap=alignment,array-bounds,bool,enum,float-cast-overflow,float-divid… 8 …-UNDEFINED-TRAP2: "-fsanitize-trap=alignment,array-bounds,bool,enum,float-cast-overflow,float-divi… 10 // RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-pr… 11 …-UNDEFINED: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|float-divide-by-zero|fu… [all …]
|
/external/clang/docs/ |
D | MemorySanitizer.rst | 12 compiler instrumentation module and a run-time library. 24 Simply compile and link your program with ``-fsanitize=memory`` flag. 25 The MemorySanitizer run-time library should be linked to the final 26 executable, so make sure to use ``clang`` (not ``ld``) for the final 27 link step. When linking shared libraries, the MemorySanitizer run-time 28 is not linked, so ``-Wl,-z,defs`` may cause link errors (don't use it 29 with MemorySanitizer). To get a reasonable performance add ``-O1`` or 31 ``-fno-omit-frame-pointer``. To get perfect stack traces you may need 32 to disable inlining (just use ``-O1``) and tail call elimination 33 (``-fno-optimize-sibling-calls``). [all …]
|
/external/llvm/cmake/modules/ |
D | HandleLLVMOptions.cmake | 16 if (CMAKE_LINKER MATCHES "lld-link.exe") 27 add_definitions( -D_DEBUG ) 29 # On non-Debug builds cmake automatically defines NDEBUG, so we 32 add_definitions( -UNDEBUG ) 41 string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " " 48 add_definitions(-DEXPENSIVE_CHECKS) 49 add_definitions(-D_GLIBCXX_DEBUG) 95 # We use *.dylib rather than *.so on darwin. 99 # Darwin-specific linker flags for loadable modules. 100 …set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl… [all …]
|