]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/msan/keep-going.cc
1 // RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1
2 // FileCheck %s <%t.out
3 // RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %run %t >%t.out 2>&1
4 // FileCheck %s <%t.out
5 // RUN: %clangxx_msan -m64 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %run %t >%t.out 2>&1
6 // FileCheck %s <%t.out
8 // RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && not %run %t >%t.out 2>&1
9 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out
10 // RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=0 not %run %t >%t.out 2>&1
11 // FileCheck %s <%t.out
12 // RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %run %t >%t.out 2>&1
13 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out
14 // RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=halt_on_error=1 not %run %t >%t.out 2>&1
15 // FileCheck %s <%t.out
16 // RUN: %clangxx_msan -m64 -mllvm -msan-keep-going=1 -O0 %s -o %t && MSAN_OPTIONS=halt_on_error=0 not %run %t >%t.out 2>&1
17 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out
19 // Test behaviour of -mllvm -msan-keep-going and MSAN_OPTIONS=keep_going.
20 // -mllvm -msan-keep-going provides the default value of keep_going flag; value
21 // of 1 can be overwritten by MSAN_OPTIONS, value of 0 can not.
26 int main(int argc
, char **argv
) {
27 char *volatile x
= (char*)malloc(5 * sizeof(char));
30 fprintf(stderr
, "Done\n");
32 // CHECK-KEEP-GOING: Done