]>
git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/compiler-rt/test/msan/sigwait.cc
1 // RUN: %clangxx_msan -std=c++11 -O0 -g %s -o %t && %run %t
2 // RUN: %clangxx_msan -DPOSITIVE -std=c++11 -O0 -g %s -o %t && not %run %t 2>&1 | FileCheck %s
9 #include <sanitizer/msan_interface.h>
15 sigaddset(&s
, SIGUSR1
);
17 sigprocmask(SIG_BLOCK
, &s
, 0);
18 // CHECK: MemorySanitizer: use-of-uninitialized-value
20 if (pid_t pid
= fork()) {
25 int res
= sigwait(&s
, &sig
);
27 // The following checks that sig is initialized.
28 assert(sig
== SIGUSR1
);