1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t 2>&1 2 3 #include <assert.h> 4 #include <sys/eventfd.h> 5 6 #include <sanitizer/msan_interface.h> 7 main(int argc,char * argv[])8int main(int argc, char *argv[]) { 9 int efd = eventfd(42, 0); 10 assert(efd >= 0); 11 12 eventfd_t v; 13 int ret = eventfd_read(efd, &v); 14 assert(ret == 0); 15 __msan_check_mem_is_initialized(&v, sizeof(v)); 16 17 assert(v == 42); 18 } 19