Home
last modified time | relevance | path

Searched +full:- +full:fsanitize +full:- +full:memory +full:- +full:track +full:- +full:origins (Results 1 – 25 of 71) sorted by relevance

123

/external/clang/test/Driver/
Dfsanitize.c1 …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/compiler-rt/test/msan/
Dheap-origin.cc1 // RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -O1 %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: %clangxx_msan -O2 %s -o %t && not %run %t >%t.out 2>&1
7 // RUN: %clangxx_msan -O3 %s -o %t && not %run %t >%t.out 2>&1
10 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
11 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
12 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t >%t.out 2>&1
13 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
14 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t >%t.out 2>&1
15 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
[all …]
Dstack-origin2.cc1 // Test that on the second entry to a function the origins are still right.
3 // RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: %clangxx_msan -O1 %s -o %t && not %run %t >%t.out 2>&1
7 // RUN: %clangxx_msan -O2 %s -o %t && not %run %t >%t.out 2>&1
9 // RUN: %clangxx_msan -O3 %s -o %t && not %run %t >%t.out 2>&1
12 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
13 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
14 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t >%t.out 2>&1
15 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
16 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t >%t.out 2>&1
[all …]
Duse-after-free.cc1 // RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -O1 %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: %clangxx_msan -O2 %s -o %t && not %run %t >%t.out 2>&1
7 // RUN: %clangxx_msan -O3 %s -o %t && not %run %t >%t.out 2>&1
10 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
11 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
12 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t >%t.out 2>&1
13 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
14 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t >%t.out 2>&1
15 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
[all …]
Dcheck_mem_is_initialized.cc1 // RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -O1 %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: %clangxx_msan -O2 %s -o %t && not %run %t >%t.out 2>&1
7 // RUN: %clangxx_msan -O3 %s -o %t && not %run %t >%t.out 2>&1
10 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
11 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
12 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t >%t.out 2>&1
13 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
14 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t >%t.out 2>&1
15 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
[all …]
Dstack-origin.cc1 // RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -O1 %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: %clangxx_msan -O2 %s -o %t && not %run %t >%t.out 2>&1
7 // RUN: %clangxx_msan -O3 %s -o %t && not %run %t >%t.out 2>&1
10 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
11 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
12 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t >%t.out 2>&1
13 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
14 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t >%t.out 2>&1
15 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-ORIGINS < %t.out
[all …]
Dchained_origin_memcpy.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -DOFFSET=0 -O3 %s -o %t && \
3 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-Z1 < %t.out
5 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -DOFFSET=10 -O3 %s -o %t && \
7 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-Z2 < %t.out
10 // RUN: %clangxx_msan -mllvm -msan-instrumentation-with-call-threshold=0 -fsanitize-memory-track-or…
12 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-Z1 < %t.out
14 // RUN: %clangxx_msan -mllvm -msan-instrumentation-with-call-threshold=0 -fsanitize-memory-track-or…
16 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-Z2 < %t.out
49 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
52 // CHECK: Uninitialized value was stored to memory at
[all …]
Dchained_origin.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O3 %s -o %t && \
3 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-STACK < %t.out
5 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -DHEAP=1 -O3 %s -o %t && \
7 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-HEAP < %t.out
10 // RUN: %clangxx_msan -mllvm -msan-instrumentation-with-call-threshold=0 -fsanitize-memory-track-or…
12 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-STACK < %t.out
14 // RUN: %clangxx_msan -mllvm -msan-instrumentation-with-call-threshold=0 -fsanitize-memory-track-or…
16 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-HEAP < %t.out
50 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
53 // CHECK: Uninitialized value was stored to memory at
[all …]
Dselect_origin.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t 2>&1 | FileCheck …
2 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t 2>&1 | FileCheck …
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t 2>&1 | FileCheck …
Duse-after-dtor.cc1 // 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 …]
Dprint_stats.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -g %s -o %t
3 // RUN: FileCheck --check-prefix=CHECK --check-prefix=CHECK-NOSTATS %s
5 // RUN: FileCheck --check-prefix=CHECK --check-prefix=CHECK-NOSTATS %s
7 // RUN: FileCheck --check-prefix=CHECK --check-prefix=CHECK-STATS %s
9 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -g -DPOSITIVE=1 %s -o %t
11 // RUN: FileCheck --check-prefix=CHECK --check-prefix=CHECK-NOSTATS %s
13 // RUN: FileCheck --check-prefix=CHECK --check-prefix=CHECK-STATS %s
15 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -g -DPOSITIVE=1 -mllvm -msan-keep-going=1 %…
17 // RUN: FileCheck --check-prefix=CHECK --check-prefix=CHECK-NOSTATS --check-prefix=CHECK-KEEPGOING…
19 // RUN: FileCheck --check-prefix=CHECK --check-prefix=CHECK-STATS --check-prefix=CHECK-KEEPGOING …
[all …]
Dchained_origin_with_signals.cc2 // This is, in fact, undesired behavior caused by our chained origins
3 // implementation being not async-signal-safe.
5 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O3 %s -o %t && \
9 // RUN: %clangxx_msan -mllvm -msan-instrumentation-with-call-threshold=0 -fsanitize-memory-track-or…
35 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
36 // CHECK-NOT: in SignalHandler
Dunpoison_string.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O3 %s -o %t
Dchained_origin_limits.cc4 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O3 %s -o %t
7 // RUN: FileCheck %s --check-prefix=CHECK7 < %t.out
10 // RUN: FileCheck %s --check-prefix=CHECK2 < %t.out
13 // RUN: FileCheck %s --check-prefix=CHECK-PER-STACK < %t.out
16 // RUN: FileCheck %s --check-prefix=CHECK7 < %t.out
19 // RUN: %clangxx_msan -DSTACK -fsanitize-memory-track-origins=2 -O3 %s -o %t
22 // RUN: FileCheck %s --check-prefix=CHECK7 < %t.out
25 // RUN: FileCheck %s --check-prefix=CHECK2 < %t.out
28 // RUN: FileCheck %s --check-prefix=CHECK-PER-STACK < %t.out
31 // RUN: FileCheck %s --check-prefix=CHECK7 < %t.out
[all …]
Dselect_float_origin.cc2 // https://code.google.com/p/memory-sanitizer/issues/detail?id=78
4 // RUN: %clangxx_msan -O2 -fsanitize-memory-track-origins %s -o %t && not %run %t >%t.out 2>&1
7 // RUN: %clangxx_msan -O2 -fsanitize-memory-track-origins=2 %s -o %t && not %run %t >%t.out 2>&1
20 // CHECK: Memory was marked as uninitialized in main()
22 // CHECK: {{#1 0x.* in main .*select_float_origin.cc:}}[[@LINE-6]] in main()
Dmsan_dump_shadow.cc1 // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t >%t.out 2>&1
4 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 -g %s -o %t && %run %t >%t.out 2>&1
7 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O0 -g %s -o %t && %run %t >%t.out 2>&1
Dunaligned_read_origin.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O3 %s -o %t && not %run %t >%t.out 2>&1
12 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value in main()
13 // CHECK: {{#0 0x.* in main .*unaligned_read_origin.cc:}}[[@LINE-2]] in main()
15 // CHECK: {{#0 0x.* in main .*unaligned_read_origin.cc:}}[[@LINE-7]] in main()
Dorigin-store-long.cc1 // Check that 8-byte store updates origin for the full store range.
2 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
4 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t >%t.out 2>&1
15 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value in main()
16 // CHECK: in main {{.*}}origin-store-long.cc:[[@LINE-2]] in main()
19 // CHECK: in main {{.*}}origin-store-long.cc:[[@LINE-8]] in main()
Dmsan_print_shadow2.cc1 // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t >%t.out 2>&1
2 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NO-ORIGINS < %t.out
4 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 -g %s -o %t && %run %t >%t.out 2>&1
5 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ORIGINS < %t.out
7 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O0 -g %s -o %t && %run %t >%t.out 2>&1
8 // RUN: FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ORIGINS < %t.out
26 // CHECK-NO-ORIGINS: 0x{{.*}}: ff...... ........ ........ ........
27 // CHECK-ORIGINS: 0x{{.*}}: ff...... ........ ........ ........ |A . . .|
28 // CHECK-ORIGINS: Origin A (origin_id {{.*}}):
31 // CHECK-NO-ORIGINS: 0x{{.*}}: ..ff.... ........ ........ ........
[all …]
Drealloc-origin.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t >%t.out 2>&1
6 // This test relies on realloc from 100 to 101 being done in-place.
15 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value in main()
16 // CHECK: {{#0 0x.* in main .*realloc-origin.cc:}}[[@LINE-2]] in main()
20 // CHECK: {{#1 0x.* in main .*realloc-origin.cc:}}[[@LINE-9]] in main()
Dinsertvalue_origin.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O3 %s -o %t && not %run %t >%t.out 2>&1
28 // CHECK: MemorySanitizer: use-of-uninitialized-value in main()
29 // CHECK: {{in main .*insertvalue_origin.cc:}}[[@LINE-3]] in main()
32 // CHECK: {{in main .*insertvalue_origin.cc:}}[[@LINE-8]] in main()
Drealloc-large-origin.cc1 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O0 %s -o %t && not %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O2 %s -o %t && not %run %t >%t.out 2>&1
6 // This is a regression test: there used to be broken "stored to memory at"
20 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value in main()
21 // CHECK: {{#0 0x.* in main .*realloc-large-origin.cc:}}[[@LINE-3]] in main()
23 // CHECK: Uninitialized value was stored to memory at in main()
25 // CHECK: {{#1 0x.* in main .*realloc-large-origin.cc:}}[[@LINE-10]] in main()
29 // CHECK: {{#1 0x.* in main .*realloc-large-origin.cc:}}[[@LINE-15]] in main()
Dmsan_copy_shadow.cc2 // the application memory.
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins=0 -O0 %s -o %t && not %run %t 2>&1
4 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O0 %s -o %t && not %run %t 2>&1 | FileChec…
26 assert(__msan_test_shadow(b + 3, 1) == -1); in main()
28 // CHECK: use-of-uninitialized-value in main()
29 // CHECK: {{in main.*msan_copy_shadow.cc:}}[[@LINE-2]] in main()
30 // CHECK: Uninitialized value was stored to memory at in main()
31 // CHECK: {{in main.*msan_copy_shadow.cc:}}[[@LINE-8]] in main()
33 // CHECK: {{in main.*msan_copy_shadow.cc:}}[[@LINE-22]] in main()
/external/clang/docs/
DMemorySanitizer.rst12 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
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``).
35 .. code-block:: console
[all …]
/external/compiler-rt/lib/msan/tests/
DCMakeLists.txt9 -fsanitize=memory
10 -fsanitize-memory-track-origins
11 -Wno-pedantic)
21 -nostdinc++
22 -isystem ${COMPILER_RT_LIBCXX_PATH}/include
25 -I${COMPILER_RT_SOURCE_DIR}/include
26 -I${COMPILER_RT_SOURCE_DIR}/lib
27 -I${COMPILER_RT_SOURCE_DIR}/lib/msan
28 -g
29 -O2
[all …]

123