1 // RUN: %clangxx_msan -std=c++11 -O0 -g %s -o %t && %run %t
4 #include <sanitizer/msan_interface.h>
9 void test_sigwaitinfo() {
12 sigaddset(&s
, SIGUSR1
);
13 sigprocmask(SIG_BLOCK
, &s
, 0);
15 if (pid_t pid
= fork()) {
20 int res
= sigwaitinfo(&s
, &info
);
22 // The following checks that sig is initialized.
23 assert(info
.si_signo
== SIGUSR1
);
24 assert(-1 == __msan_test_shadow(&info
, sizeof(info
)));