1 // RUN: %clangxx_msan -O0 -std=c++11 -g %s -o %t
2 // RUN: %run %t _ 2>&1 | FileCheck %s --check-prefix=CLEAN
3 // RUN: not %run %t A 2>&1 | FileCheck %s --check-prefix=A
4 // RUN: not %run %t B 2>&1 | FileCheck %s --check-prefix=B
11 #include <sanitizer/msan_interface.h>
13 int main(int argc
, char **argv
) {
19 int res
= ppoll(nullptr, 0, &ts
, nullptr);
23 __msan_poison(&ts
.tv_sec
, sizeof(ts
.tv_sec
));
24 ppoll(nullptr, 0, &ts
, nullptr);
25 // A: use-of-uninitialized-value
30 fprintf(stderr
, "==1\n");
35 ppoll(nullptr, 0, &ts
, &sig
);
36 // B: use-of-uninitialized-value
40 fprintf(stderr
, "==2\n");