]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/msan/keep-going-dso.cc
1 // RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1
2 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out
3 // RUN: %clangxx_msan -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 -O0 %s -o %t && MSAN_OPTIONS=keep_going=1 not %run %t >%t.out 2>&1
6 // FileCheck --check-prefix=CHECK-KEEP-GOING %s <%t.out
8 // RUN: %clangxx_msan -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 -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 -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
15 // Test how -mllvm -msan-keep-going and MSAN_OPTIONS=keep_going affect reports
17 // -mllvm -msan-keep-going provides the default value of keep_going flag, but is
18 // always overwritten by MSAN_OPTIONS
24 int main(int argc
, char **argv
) {
25 char *volatile x
= (char*)malloc(5 * sizeof(char));
29 fprintf(stderr
, "Done\n");
31 // CHECK-KEEP-GOING: Done